generator-meteorjs
v0.1.3
Published
Yeoman generator for MeteorJS application and package.
Maintainers
Readme
generator-meteorjs
Yeoman generator for MeteorJS application and packages. This generator relies on meteor command line in order to generate application and package stubs.
Note: As this project is at development stage, please don't hesitate to use Issues section for any suggestion.
Prerequisites
To install yeoman from npm, run:
$ npm install -g yoInstall
To install generator-meteorjs from npm, run:
$ npm install -g generator-meteorjsInitiate the generator:
$ yo meteorjs myblog --coffee --packages reader,writer,coreFinally, run Meteor:
$ cd myblog
$ meteorFeatures
Application generator (default)
Create a MeteorJS application from scratch based on command line options and answers to prompted questions.
yo meteorjs --helpArguments:
namewhen specified, generate projet in a new sub-directory named as is.
Options are:
--coffeefor CoffeeScript language support--verboseto activate debug traces--packages list,of,pkgto create empty packages inside the application--styles <less|fourseven:scss|...>Use a specific styles generator--routerEnable FlowRouter support as routing middleware--secureRemove default packages: "insecure" and "autopublish"--helpto display all generator options
Some options disable questions related to
Answers to questions are stored for next execution then you won't have my defaults a second time ^^
Generator sub-commands
meteorjs:route
Generates a new route with path registration and associated template.
Argument is route path and you can also specify --template <name> to generate and associate a custom template name.
Template name is auto-generated if not overriden by
--templateoption. e.g.: for path/posts/:postId, a template named posts is generated.
Structure
When this script is called:
yo meteorjs myblog --router --packages reader,writer,core
yo meteorjs:route /posts --template postListThis structure is created ($ tree .):
├── client
│ ├── head.html
│ ├── index.js
│ ├── layout.html
│ ├── myblog.less
│ └── templates
│ ├── postList.html
│ └── postList.js
├── collections.js
├── packages
│ ├── core
│ │ ├── README.md
│ │ ├── core-tests.js
│ │ ├── core.js
│ │ └── package.js
│ ├── reader
│ │ ├── README.md
│ │ ├── package.js
│ │ ├── reader-tests.js
│ │ └── reader.js
│ └── writer
│ ├── README.md
│ ├── package.js
│ ├── writer-tests.js
│ └── writer.js
└── router.jsFile contents
User generated packages are, for instance, exactely the same those generated by command meteor create --package <package-name>.
router.js
client/index.js
Contributing
Clone repository:
git clone [email protected]:gghez/generator-meteorjs.gitTests are located in ./test folder and can be run using command npm test.
When feature added and tested, send your PR.
