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 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

orion-cli's People

Contributors

matteodem avatar mrauhu avatar rasmushjulskov avatar jprogrammer avatar jrmlstf avatar

Stargazers

Samuel Ladapo avatar Graham Place avatar  avatar Layla  avatar JT avatar Ivan Yordanov avatar Bryan M. Li avatar Ron Talman avatar Christopher Thon avatar Zack Brown avatar Michael 'afrolion' Perrotte avatar Florent CLAPIÉ avatar Hanh Tran avatar José Ney Guerrero avatar Paul Biester avatar Raí Siqueira avatar Angus H. avatar Haixing Hu avatar Nick Hess avatar gregory nicholas avatar Florian Rathgeber avatar pablo de la sotta avatar Darek Darkowski avatar Roman Dutchak avatar Paul Dariye avatar Mark Hurwitz avatar 0xPatrick avatar Mac Cowell avatar Humanismusic avatar Kevin Bluer avatar KayRules avatar David Cousido avatar Petri avatar Fedor Parfenov avatar Tareq Jobayere avatar Stéphane RAULT avatar Geoff Whatley avatar Jon Baer avatar Eloi avatar Griffen Fargo avatar AnDreh avatar Finn Heemeyer avatar Jesse Florig avatar Toon van Ramshorst avatar Constantine Chuprik avatar David Lio avatar Blake Dietz avatar Adib Saad avatar Adam Walsh avatar Michael Nino Evensen avatar yann avatar Shawn Cheatham avatar Michał Sajnóg avatar Ahnerd avatar  avatar Andrey avatar Rodrigo Gabriel avatar  avatar The Meteor Chef avatar Gabriel avatar David Adair avatar Johan Borestad avatar Antoine Buteau avatar crapthings avatar Bogdan-Florin Florea avatar Andy Lu avatar Charleno Pires avatar Ben Strahan avatar Alexander Troshin avatar wastemobile avatar Ulrich Diedrichsen avatar M Haidar Hanif avatar 谢远亮 avatar Sean Ragsdale avatar

Watchers

wastemobile avatar James Cloos avatar  avatar Ron Talman avatar

orion-cli's Issues

Requiering sudo for all action within a orion app

I just created a meteor app using orion, but I noticed I needed to run all commands (including orion create) to be sudo. Even creating files and saving them require my password. The last time I tried it it didn't do that. Is it changed to be that way, or did I do something wrong?

Issue with orion generate command

For some reason it puts undefined into the path E:\sb-meteor\undefined\private\templates\html\view.html

E:\sb-meteor>orion generate view orion | What's the name of your view? | test

fs.js:439 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);

Error: ENOENT, no such file or directory 'E:\sb-meteor\undefined\private\templates\html\view.html' at Object.fs.openSync (fs.js:439:18) at Object.fs.readFileSync (fs.js:290:15) at C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cli\lib\fileManager.js:20:32 at Array.forEach (native) at Object.FileManager.generateTemplates (C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cl i\lib\fileManager.js:19:16) at C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cli\commands\generate.js:88:29 at C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cli\node_modules\prompt\lib\prompt.js:31 6:32 at C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cli\node_modules\prompt\node_modules\uti le\node_modules\async\lib\async.js:142:25 at assembler (C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cli\node_modules\prompt\lib\p rompt.js:313:9) at C:\Users\Vlad\AppData\Roaming\npm\node_modules\orion-cli\node_modules\prompt\lib\prompt.js:32 2:32

Problem with install "orion create test"

I base on win 7, and i have problem with orion create test it show:

TypeError: Arguments to path.resolve must be strings
    at exports.resolve (path.js:116:15)
    at Object.module.exports [as cb] (C:\Users\Theara\AppData\Roaming\npm\node_m
odules\orion-cli\commands\create.js:8:17)
    at Object.ArgParser.parse (C:\Users\Theara\AppData\Roaming\npm\node_modules\
orion-cli\node_modules\nomnom\nomnom.js:302:15)
    at Object.exports.execute (C:\Users\Theara\AppData\Roaming\npm\node_modules\
orion-cli\main.js:54:10)
    at Object.<anonymous> (C:\Users\Theara\AppData\Roaming\npm\node_modules\orio
n-cli\bin\orion:9:27)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)

accounts package (Alternate)

Hi @matteodem

I wanted to use the accounts-github over accounts-password. I need your help in finding the right placeholder for making this happen.

When I add accounts-github and remove accounts-password, I am unable to start a login configuration. Please help

Orion command doens't do anything at all

I have Meteor, node, and perl installed on Mint-linux.

After installing orion, the command exists, but just has no effect at all.
create, set-profile, init, help -> no effect
also if I just type $orion lkjdfkjdashkfjsgdfg
nothing happens..
Is something missing on my machine? I don't find any info on that issue

Take default description

  • Change profile to coffee
  • call orion generate for the list
  • It displays default description if profile is not specified

Generate model error

orion generate model got some error..

TypeError: Object #<Object> has no method 'map'
    at Object.module.exports [as cb] (/Users/yoyodyne/.nvm/v0.10.32/lib/node_modules/orion-cli/commands/generate.js:68:51)
    at Object.ArgParser.parse (/Users/yoyodyne/.nvm/v0.10.32/lib/node_modules/orion-cli/node_modules/nomnom/nomnom.js:302:15)
    at Object.exports.execute (/Users/yoyodyne/.nvm/v0.10.32/lib/node_modules/orion-cli/main.js:54:10)
    at Object.<anonymous> (/Users/yoyodyne/.nvm/v0.10.32/lib/node_modules/orion-cli/bin/orion:9:27)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)

Only a beginning developer, couldn't figure out what happen...

Add general package check for profiles

possibility to specifiy an array with packages for each profile to be added to the project when switching.
For example "coffeescript" package for "coffee" profile

Signups Forbidden

I have created a site using orion-cli. One of the first things I do is a reset to clear out the demo code and remove autopublish. However, using accounts-base and accounts-password, every time i try to create an account I get a "Signups forbidden" message. This is not a problem when I do an app without orion-cli. I have added the line "Accounts.config({var forbidClientAccountCreation = false;})" and it has no bearing, Signups are still forbidden. Any help on this would be appreciated greatly!!

node not found on ubuntu 14.04

After installing orion-cli, the orion command may fail with
"/usr/bin/env: node: No such file or directory"

A possible workaround is to create a link
ln -s /usr/bin/nodejs /usr/bin/node

Orion CLI does not get input from Windows command line

Same bug:

OS and software

C:\dev>ver

Microsoft Windows [Version 6.1.7601]

C:\dev>node -v
v0.10.38

C:\dev>npm -v
1.4.28

C:\dev>meteor --version
Meteor 1.1.0.2

How to reproduce

  1. Create project
orion create test
cd test
  1. Try to generate view
C:\dev\test>orion generate view          _
orion | What's the name of your view? |

_ — cursor position, on same line where command entered

Let's name it test_view

Result

fs.js:439
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'C:\dev\test\undefined\private\templates\html\view.html'
    at Object.fs.openSync (fs.js:439:18)
    at Object.fs.readFileSync (fs.js:290:15)
    at %APPDATA%\npm\node_modules\orion-cli\lib\fileManager.js:20:32
    at Array.forEach (native)
    at Object.FileManager.generateTemplates (%APPDATA%\npm\node_modules\orion-cli\lib\fileManager.js:19:16)
    at %APPDATA%\npm\node_modules\orion-cli\commands\generate.js:88:29
    at %APPDATA%\npm\node_modules\orion-cli\node_modules\prompt\lib\prompt.js:316:32
    at %APPDATA%\npm\node_modules\orion-cli\node_modules\prompt\node_modules\utile\node_modules\async\lib\async.js:142:25
    at assembler (%APPDATA%\npm\node_modules\orion-cli\node_modules\prompt\lib\prompt.js:313:9)
    at %APPDATA%\npm\node_modules\orion-cli\node_modules\prompt\lib\prompt.js:322:32

Expected

Successfully created following files:
    client/views/test_view/test_view.html
    client/views/test_view/test_view.js

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.