Console scaffolding and development tool for Meteor Apps.
npm install -g orion-cli
You can create meteor apps by using orion create, which downloads the Meteor Boilerplate.
--blank or -b let's you create a blank app (same as calling orion init
).
orion create meteorApp
orion create -b blankApp
If you have a proxy, you need to set the http_proxy
variable to access the repository.
export http_proxy=http://myproxy.net:myport
You can reset the app to remove all the default code.
orion reset
Initialize Meteor Apps for use with scaffolding with following command.
cd existingMeteorApp
orion init
The resulting file orion-config.json under private/ has existing templates, list them by calling orion generate
. The configuration has following
structure.
{
"generate" : {
"templateName" : {
"default" : {
"desc" : "description for template",
"files" : ["private/templates/someFile.html"],
"variables" : [
{
"name" : "templateVar",
"desc" : "templateQuestion"
}
]
},
"otherProfileName" : {
"files" : ["private/templates/someOtherFile.html"]
}
}
}
}
The template file also has one required line of configuration, which looks like following.
<!-- { "path" : "client/views/__templateVar__.html" } -->
<template name="__templateVar__">
<h1>This is the content</h1>
<template>
You can use the variables in the template, as long as the json configuration for the path is on the first line it'll recognize it.
You can create components, routes, models and more in the default configuration or change it and add more templates.
orion generate component
orion generate routes
The default profiles in the configuration are ES2015 and coffee, which generates other kind of files. You can also define your own profiles.
orion set-profile coffee