Skip to content

A scaffolding command line tool for Meteor applications.

Notifications You must be signed in to change notification settings

mediatainment/em

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

em

A command line scaffolding tool for Meteor applications. It automatically creates project structure, files and boilerplate code. The project structure mimics that of the EventedMind publishing platform.

Installation

Install the em command line tool globally so you can use it from any project directory.

$ npm install -g meteor-em

Pre-Reqs

You'll want to have Iron Router installed. Also, this command line tool just handles scaffolding for now. mrt and meteor are different command line tools. Hopefully, sometime in the near future we can enhance the meteor command line tool to be pluggable!

Usage

Just type em from the command line and you'll see the various top level commands. Then type em generate or em g to see a list of generators.

You can initialize your project structure like this:

$ em init

A config file will be generated in your project — .em/config.json, and you will be able to specify what types of files will be created for you when you generate a view resource. You can also specify alternative file extensions, e.g. .jade, .sass, and .coffee:

{
  "view": {
    "html": {
      "create": true,
      "extension": ".html"
    },
    "css": {
      "create": true,
      "extension": ".css"
    },
    "js": {
      "create": true,
      "extension": ".js"
    }
  }
}

Initializing with options

When running em init you can also pass in options to save some time. For example:

$ em init --ir --css=false --js=coffee

This will install Iron Router, set css file creation to false (css files will not be created when generating a new view), and set your preferred js file extensions to .coffee.

Note: --css=less or --css=sass will change css file extensions to .less and .scss respectively.

Once your project is initialized and your config.json file is set up, you can begin generating various resources. Here are a few examples:

$ em g:scaffold todos
$ em g:view todos/todo_item
$ em g:controller webhooks/stripe --where "server"
$ em g:route todos/todo_show

Contributing

This is an early alpha project and any thoughts and contributions are welcome.

Tests

To run tests

npm test

License

MIT

About

A scaffolding command line tool for Meteor applications.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.5%
  • CSS 1.5%