Yeoman generator for recroom open web apps.
Перейти к файлу
Brittany Storoz 04229b500a Update structure header 2014-09-09 12:19:21 -04:00
app Swap out stylus for sass 2014-09-03 16:08:09 -04:00
controller Skip extra router work for now 2014-08-06 02:25:44 -04:00
model Just use "App" for AppName (fix #8) 2014-07-31 01:01:00 -04:00
page Add "page" generator (fix #5) 2014-07-15 22:51:22 -04:00
router Just use "App" for AppName (fix #8) 2014-07-31 01:01:00 -04:00
test Test for "App" and not <%= appName %> (#8) 2014-07-31 11:46:35 -04:00
view Just use "App" for AppName (fix #8) 2014-07-31 01:01:00 -04:00
.gitignore Remove coffeescript 2014-05-22 19:12:59 -04:00
.jshintrc Just use "App" for AppName (fix #8) 2014-07-31 01:01:00 -04:00
.travis.yml Test on travis 2014-05-22 19:18:12 -04:00
Gruntfile.js Remove coffeescript 2014-05-22 19:12:59 -04:00
LICENSE Add a license 2014-08-05 21:59:21 -04:00
README.md Update structure header 2014-09-09 12:19:21 -04:00
package.json Skip extra router work for now 2014-08-06 02:25:44 -04:00

README.md

recroom Yeoman Generator Build Status

A Yeoman Generator for building recroom apps based on the Yeoman Ember.js Generator.

While this generator was built as part of a larger recroom toolkit, it can also be used on its own as a standard Yeoman generator. For more information on creating recroom apps, see Time To Get Hacking: Introducing Rec Room. If you'd like to use this generator on its own, install it via npm:

npm install generator-recroom

Create and cd into a new directory:

mkdir new-recroom-app && cd $_

Create a new recroom app:

yo recroom your-app-name

##Generators ###Controller

yo recroom:controller controllerName

Creates:

app/scripts/controllers/controllerName_controller.js
app/scripts/controllers/controllerName_edit_controller.js
app/scripts/controllers/controllerNamePlural_controller.js
app/scripts/routes/controllerName_route.js
app/scripts/routes/controllerName_edit_route.js
app/scripts/routes/controllerNamePlural_route.js
app/templates/controllerName.hbs
app/templates/controllerName/edit.hbs
app/templates/controllerNamePlural.hbs
app/scrips/views/controllerName_view.js
app/scripts/views/controllerName_edit_view.js
app/scripts/views/controllerNamePlural_view.js

###Page

yo recroom:page pageName

Creates:

app/scripts/controllers/pageName_controller.js
app/scripts/routes/pageName_route.js
app/templates/pageName.hbs
app/scripts/views/pageName_view.js

###Model

yo recroom:model modelName

Creates:

app/scripts/controllers/modelName_controller.js
app/scripts/controllers/modelName_edit_controller.js
app/scripts/controllers/modelNamePlural_controller.js
app/scripts/models/modelName_model.js
app/scripts/routes/modelName_route.js
app/scripts/routes/modelNamePlural_route.js
app/scripts/routes/modelName_edit_route.js
app/templates/modelName.hbs
app/templates/modelName/edit.hbs
app/templates/modelNamePlural.hbs
app/scripts/views/modelName_view.js
app/scripts/views/modelName_edit_view.js
app/scripts/views/modelNamePlural_view.js

###View

yo recroom:view viewName

Creates:

app/scripts/views/viewName_view.js
app/templates/viewName.hbs
app/scripts/views/viewName_edit_view.js
app/scripts/views/viewNamePlural_view.js
app/templates/viewName/edit.hbs
app/templates/viewNamePlural.hbs

##Grunt Tasks The default grunt task will run jshint, test and build.

  • serve - Serves your app on port 9000 and will livereload when changes are made
  • test - Runs any unit tests with mocha & chai
  • build - Compiles the distributable build of your app to the dist/ folder
  • deploy - Builds and deploys your app to github pages

##App Structure The base skeleton of your application will look something like this:

├── app
│   ├── bower_components    - Bower dependencies
│   ├── images              - Custom image assets/icons
│   ├── scripts             - App-specific MVC components
│   │   └── controllers
│   │   └── models
│   │   └── routes
│   │   └── views
│   ├── styles
│   │   └── app.scss        - SASS file for app styles
│   │   └── normalize.css   - CSS file for cross-browser consistency
│   ├── templates           - Handlebars app templates
│   │   └── application.hbs - Base application template
│   │   └── index.hbs       - Root template content
│   ├── index.html          - Index file pulling content from application.hbs
│   ├── manifest.webapp     - App manifest
│
├── dist                    - Distributable build of the app
│
└── test
    ├── spec                - Mocha/Chai unit test scripts
    ├── index.html          - Mocha Spec Runner page

##Generator Structure TODO: Add missing folders.

app
The folder structure output by `recroom new` (`yo recroom`). Contains basic folder structure, package manifests, and `application.hbs` and `index.html`, where your application's base templates live. Also includes a `Gruntfile.js` that contains most of the build tasks for your Rec Room app.
controller
Contains all Ember controller templates, both for simple `page` scaffolds and more complicated `model` scaffolds (eg. single/plural controllers, and edit controllers).