Skip to content

Add boot script generator - #93

Merged
superkhau merged 1 commit into
masterfrom
feature/boot-script-generator
Mar 11, 2015
Merged

Add boot script generator#93
superkhau merged 1 commit into
masterfrom
feature/boot-script-generator

Conversation

@superkhau

Copy link
Copy Markdown
Contributor
  • Add code for slc loopback:boot script command
  • Add unit tests

Connected to #90

@superkhau
superkhau force-pushed the feature/boot-script-generator branch from 5aa9184 to 086c38e Compare March 5, 2015 01:31
@superkhau superkhau self-assigned this Mar 5, 2015
@superkhau
superkhau force-pushed the feature/boot-script-generator branch from 086c38e to 4a13be7 Compare March 5, 2015 01:34
@superkhau

Copy link
Copy Markdown
Contributor Author

@bajtos Review please.

/cc @raymondfeng @ritch

Comment thread boot-script/index.js Outdated

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.

Please fix the message

@superkhau
superkhau force-pushed the feature/boot-script-generator branch from 4a13be7 to dac8b1e Compare March 5, 2015 18:17
Comment thread boot-script/index.js

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@raymondfeng Fixed.

@superkhau superkhau assigned bajtos and unassigned superkhau Mar 6, 2015
Comment thread boot-script/templates/async.js Outdated

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.

Two empty lines, please keep only one of them.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@bajtos

bajtos commented Mar 9, 2015

Copy link
Copy Markdown
Member

In the future, when we implement support for multiple facets (e.g. configuring loopback app in "client"), we'll need to support "/client/boot" too.

Right now, I just want to check that the current design won't make it difficult to support that?

@bajtos bajtos assigned superkhau and unassigned bajtos Mar 9, 2015
@superkhau
superkhau force-pushed the feature/boot-script-generator branch from dac8b1e to 12d57b5 Compare March 9, 2015 18:05
@superkhau superkhau assigned bajtos and unassigned superkhau Mar 9, 2015
@superkhau

Copy link
Copy Markdown
Contributor Author

Yes, a simple refactor to accept a different destination dir will be possible. In that future case you describe, I'm thinking we can ask one more question (Is this a client or server side boot script? (show a list of two options client and server).

@superkhau

Copy link
Copy Markdown
Contributor Author

@bajtos Added your review changes, PTAL again.

@superkhau superkhau assigned superkhau and unassigned bajtos Mar 9, 2015
@superkhau
superkhau force-pushed the feature/boot-script-generator branch from 12d57b5 to a269d8c Compare March 9, 2015 21:20
Comment thread boot-script/templates/async.js Outdated

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.

Maybe better to have the following:

/* 
 * The `app` object allows you to access a model by name (e.g. MyModel) as `app.models.MyModel`
 * or a data source by name (e.g. MyMongoDB) as `app.dataSources.MyDataSource`
 */
process.nextTick(cb); // Please remove it if you already pass `cb` to an async function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Updating, except for the comment which is too long to fit in 80 chars. I also add the app object comments to sync.js.

- Add code for `slc loopback:boot script` command
- Add unit tests
@superkhau
superkhau force-pushed the feature/boot-script-generator branch from a269d8c to 3ce547c Compare March 9, 2015 23:15

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@bajtos

bajtos commented Mar 10, 2015

Copy link
Copy Markdown
Member

LGTM, please wait for @raymondfeng to approve too.

@bajtos bajtos assigned raymondfeng and unassigned superkhau Mar 10, 2015
@raymondfeng

Copy link
Copy Markdown
Member

LGTM

@raymondfeng raymondfeng assigned superkhau and unassigned raymondfeng Mar 11, 2015
superkhau added a commit that referenced this pull request Mar 11, 2015
@superkhau
superkhau merged commit 4c5945a into master Mar 11, 2015
@superkhau superkhau removed the #review label Mar 11, 2015
@superkhau
superkhau deleted the feature/boot-script-generator branch March 11, 2015 23:06
@superkhau

Copy link
Copy Markdown
Contributor Author

@crandmck Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants