The-M-Project generator
A Yeoman generator for The-M-Project.
Notice
This module is under development and not yet ready for production use.
Getting Started
Make sure you have installed Node.js, Git and optionally, Ruby and Compass (if you plan to use Compass).
Install: npm install -g generator-tmp2
Make a new directory and cd
into it:
mkdir my-new-project && cd $_
Run the yo generator:
yo tmp2
Run grunt
for building and grunt server
for preview
Generators
Available generators:
App
Create a new The-M-Project app and generate all the boilerplate for you.
yo tmp2
View
Generates a view in app/scripts/views
.
Example:
yo tmp2:view foo
Produces app/scripts/views/foo.js
:
APPNAMEViewsFooView = MView
Layout
Generates a layout in app/scripts/layouts
.
Example:
yo tmp2:layout foo
Produces app/scripts/layouts/foo.js
:
APPNAMELayoutsFooLayout = MLayout
Controller
Generates a controller in app/scripts/controllers
.
Example:
yo tmp2:controller foo
Produces app/scripts/controllers/foo.js
:
APPNAMEControllersFooController = MController
Model
Generates a model in app/scripts/models
.
Example:
yo tmp2:model foo
Produces app/scripts/models/foo.js
:
APPNAME.Models.FooModel = M.Model.extend({
// ...
})
Collection
Generates a collection in app/scripts/collections
.
Example:
yo tmp2:collection foo
Produces app/scripts/collections/foo.js
:
APPNAMECollectionsFooCollection = MCollection
Router
Generates a router in app/scripts/routers
.
Example:
yo tmp2:routers foo
Produces app/scripts/routers/foo.js
:
APPNAMERoutersFooRouter = MRouter
I18N
Generates a i18n in app/i18n
.
Example:
yo tmp2:i18n en
Produces app/i18n/en.json
:
Options
-
--skip-install
Skips the automatic execution of
bower
andnpm
after scaffolding has finished. -
--test-framework <framework>
Defaults to
mocha
. Can be switched for another supported testing framework likejasmine
.
Contribute
See the contributing docs
When submitting an issue, please follow the guidelines. Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.
When submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.
When submitting a new feature, add tests that cover the feature.