Numerous Packages Multiply
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    generator-marionette-modulespublic

    generator-marionette-modules Build Status

    Yeoman generator. For scaffolding a Marionette app with the Module pattern.

    This project uses things like: less, dustjs (linkedin), requirejs and mocha.

    Getting Started

    First make sure you have Yeoman installed:

    $ npm install -g yo

    Then install generator-marionette-modules from npm, run:

    $ npm install -g generator-marionette-modules

    Make a new directory, and cd into it:

    $ mkdir newProject && cd $_

    Then initiate the generator, optionally passing an app name:

    $ yo marionette-modules [appName]

    Then start generating modules for your app like so:

    $ yo marionette-modules:module [MODULENAME]

    To generate action (submodules) for your app:

    NOTE: there are no args or options at this point for action

    $ yo marionette-modules:action

    NOTE: This is not complete:

    If you want just a view for a module use: (Eg: list, show etc.)

    $ yo marionette-modules:view [MODULENAME] [VIEWNAME]

    How to setup.

    After you install a module, you also need to configure it to run.

    So in your main app.js file, change the placeholder MODULENAME to whatever you named your module, in the two places listed below

    To load your module change line 59:

    require(['modules/MODULENAME/app'], function () {

    Also on line 70, change the home page to one of your choosing:

    App.trigger('MODULENAME:list');

    For dev:

    grunt watch

    To build for prod:

    grunt build

    To run tests:

    grunt test

    License

    MIT

    install

    npm i generator-marionette-modules

    Downloadsweekly downloads

    10

    version

    0.4.2

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar