generator-tmp2

0.0.18 • Public • Published

The-M-Project generator Build Status Coverage Status

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:

APPNAME.Views.FooView = M.View.extend({
   // ...
})

Layout

Generates a layout in app/scripts/layouts.

Example:

yo tmp2:layout foo

Produces app/scripts/layouts/foo.js:

APPNAME.Layouts.FooLayout = M.Layout.extend({
   // ...
})

Controller

Generates a controller in app/scripts/controllers.

Example:

yo tmp2:controller foo

Produces app/scripts/controllers/foo.js:

APPNAME.Controllers.FooController = M.Controller.extend({
   // ...
})

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:

APPNAME.Collections.FooCollection = M.Collection.extend({
   // ...
})

Router

Generates a router in app/scripts/routers.

Example:

yo tmp2:routers foo

Produces app/scripts/routers/foo.js:

APPNAME.Routers.FooRouter = M.Router.extend({
   // ...
})

I18N

Generates a i18n in app/i18n.

Example:

yo tmp2:i18n en

Produces app/i18n/en.json:

{
    "global.button.save": "Save document",
    "global.button.emptyTrash": "Empty Trash ({{count}})",
    "global.error.permissionDenied": "Permission denied"
}

Options

  • --skip-install

    Skips the automatic execution of bower and npm after scaffolding has finished.

  • --test-framework <framework>

    Defaults to mocha. Can be switched for another supported testing framework like jasmine.

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.

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i generator-tmp2

Weekly Downloads

2

Version

0.0.18

License

none

Last publish

Collaborators

  • mwaylabs