Giter Site home page Giter Site logo

orion-cli's Introduction

orion-cli

Console scaffolding and development tool for Meteor Apps.

How to install

npm install -g orion-cli

How to use

Creating apps

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

Reset apps

You can reset the app to remove all the default code.

orion reset

Initializing exiting apps

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.

Generating files

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

Change profiles

The default profile in the configuration is ES2015, which generates other kind of files. You can also define your own profiles.

orion-cli's People

Contributors

matteodem avatar mrauhu avatar rasmushjulskov avatar jprogrammer avatar jrmlstf avatar

Watchers

James Cloos avatar Mike Hill avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.