A command line scaffolding tool for Meteor applications. It automatically creates project structure, files and boilerplate code.
Install the iron command line tool globally so you can use it from any project directory.
$ npm install -g iron-meteor
This replaces the em
command line tool.
You can remove the meteor-em tool like this:
$ npm uninstall -g meteor-em
You can upgrade an existing project either by hande or by using the migrate
command like this:
./my-app
$ iron migrate
Use the help
command to get a list of the top level commands.
$ iron help
Use the g
command to see a list of generators.
$ iron g
Run Iron in verbose mode (extended logging)
$ IRON_DEBUG=true iron
The application will have the following directory structure:
my-app/
.iron/
config.json
bin/
build/
config/
development/
env.sh
settings.json
app/
client/
collections/
lib/
stylesheets/
templates/
head.html
lib/
collections/
controllers/
methods.js
routes.js
packages/
private/
public/
server/
collections/
lib/
methods.js
publish.js
bootstrap.js
$ iron g:scaffold todos
$ iron g:template todos/todo_item
$ iron g:collection todos
$ iron g:route webhooks/stripe --where "server"
$ iron g:controller todos/show_todo
$ iron g:route todos/show_todo --action "show"
$ iron g:publish todos
$ iron g:stylesheet main
$ iron g:package package:name
$ iron create my-app
The following parameters can be specified:
--css=css|scss|less
--js=js|coffee|es6
--html=html|jade
--skip-template-css=true|false
--skip-template-js=true|false
--skip-template-html=true|false
--skip-iron-router
--skip-route-controller
--skip-route-template
--skip-generator-comments
NOTE
Implementing complete customization and configuration is high on the development priority list. See the Github issue if you'd like to contribute.
$ iron run
This will automatically load your config/development/env.sh and config/development/settings.json files.
$ iron run --env=staging
This will use the config files in config/staging
instead.
$ iron debug
$ iron build
$ cd app/
$ meteor mongo
NOTE
Ideally running iron mongo
in the project directory should work but it doesn't for some reason and is being tracked in issue #136
Meteor Up is a command line tool to deploy any Meteor app to your own server.
The following configuration options are supported in config.json
:
"mup": {
"version": "mup" or "mupx",
"environment": "/path/to/environment"
}
Use iron mup
to run Meteor Up commands. To create a mup.json
file for an environment run:
iron mup <environment> --init
IMPORTANT
Your mup.json
file must contain "enableUploadProgressBar": false
to work with Iron.
After configuring mup.json
, the server can be bootstrapped with a single command:
iron mup <environment> --setup
'iron mup development' //deploy to development environment
'iron mup dev' // shortcut for development
'iron mup production'
'iron mup prod'
'iron mup <custom-from-config>'
Iron projects require buildpacks to look for the app in /app/ in addition to the root for deployments to work. Currently there is a patched version of the Horse buildpack available that is compatible with Iron based projects. Use this fork until the patches has been added to the main Horse repo.
$ heroku config:set BUILDPACK_URL=https://github.com/lirbank/meteor-buildpack-horse.git
This will build your application and put the resulting bundle into the project's build folder.
Meteor commands will automatically be proxied to the meteor command line tool.
Contributions and ideas are welcome.
To run tests
npm test
MIT