Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions bin/lb-ng
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ var argv = optimist
.describe('m', 'The name for generated Angular module.')
.default('m', 'lbServices')
.describe('u', 'URL of the REST API end-point')
.alias({ u : 'url', m: 'module-name' })
.describe('s', 'Include model schema definition')
.alias({ u : 'url', m: 'module-name', s: 'include-schema' })
.demand(1)
.argv;

Expand All @@ -26,9 +27,10 @@ assertLoopBackVersion();

var ngModuleName = argv['module-name'] || 'lbServices';
var apiUrl = argv['url'] || app.get('restApiRoot') || '/api';
var includeSchemas = argv['include-schema'];

console.error('Generating %j for the API endpoint %j', ngModuleName, apiUrl);
var result = generator.services(app, ngModuleName, apiUrl);
console.error('Generating %j for the API endpoint %j', ngModuleName, apiUrl, includeSchemas);
var result = generator.services(app, ngModuleName, apiUrl, includeSchemas);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akera-io Could you please rework this line to use the new options-based API introduced in strongloop/loopback-sdk-angular#223?


if (outputFile) {
outputFile = path.resolve(outputFile);
Expand Down