Skip to content

Add generator for boot scripts #90

Closed

Description

@superkhau

I would like to add a generator to scaffold boot scripts, something like:

slc loopback:boot
What kind of boot script would you like to generate?
>o sync
o async
What do you want to name your boot script? <enter name>
[generate <name>.js] in /server/boot with the following contents:
#sync
module.exports = function(app) {

}
#async
module.exports = function(app, cb) {

  cb();
};

@bajtos @raymondfeng @ritch Thoughts?

Connected to #93

Activity

  1. bajtos commented on Feb 24, 2015

    @bajtos
    Member

    Sure, why not. Perhaps loopback:boot-script would be a better name.

    At the moment, loopback-workspace does not provide any API for boot scripts. I don't think it makes much sense to introduce such API, thus I am proposing to keep the implementation of this feature in the generator only.

  2. raymondfeng commented on Feb 24, 2015

    @raymondfeng
    Member

    +1. We should also add 'loopback:method' to generate custom remote method, which is even more useful.

  3. superkhau commented on Feb 24, 2015

    @superkhau
    ContributorAuthor

    @raymondfeng +1 Remote method is probably even more important. We should probably go with loopback:remote-method (sticking with @bajtos loopback:boot-script suggestion from above - I agree it's more clear). We should create a separate issue for that one though.

    We should probably also do loopback:operation-hook to make it feature complete.

  4. self-assigned this
    on Feb 24, 2015
  5. superkhau commented on Mar 5, 2015

    @superkhau
    ContributorAuthor

    +1. We should also add 'loopback:method' to generate custom remote method, which is even more useful.

    Moving discussion to #94

    We should probably also do loopback:operation-hook to make it feature complete.

    Moving discussion to #95

  6. superkhau commented on Mar 5, 2015

    @superkhau
    ContributorAuthor

    PR at #93

  7. superkhau commented on Mar 9, 2015

    @superkhau
    ContributorAuthor

    @bajtos Removed yo-rc.json related code. PTAL again.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions