gapp

1.4.8 • Public • Published

gapp - in progress

gapp - Automate Development

npm install -g gapp

Table of Contents

Yeoman Generators

With gapp, yeoman has been simplified. There is no need to run the introductory methods.
For example, with the yeoman angular generator, if you don't have it, you would have to run

npm install -g generator-angular

Then

yo angular

In gapp you run

gapp --gen angular

If you don't have the generator, it will install it then run the generator automatically.
To run sub-generators you still have to use yo.
eg.

yo angular:controller

But yo comes as a global package with gapp

Command Line Conditionals

gapp can run any command through if, elseif, and else conditionals.
- Any JavaScript comparison operator is applicable. Truthy and Falsy ones included. - Quotes aren't necessary, but suggested for readability.

Example:

gapp if $TOMCAT_HOME === '/Library/Tomcat' then 'echo Found Tomcat' elseif $NODE_ENV === 'production' then 'echo in production mode' else 'echo nothing was true!'

gapp can perform

  • if
  • if -> else
  • if -> elseif -> else

At the moment

Suggested by toish!

Create a Request Server

Options:

  • serve (--serve) [required] Route from which to serve
  • type (--type) [Default: get] Type of route
    available types [get, post, delete, put]
  • file (--file) or message (-m) [required] File/Message returned from route
  • port (-p) [Default: 3000]
  • static (--static) Static folder served

Examples:

gapp --serve /route --type get --file app/index.html --static app/public -p 8080
gapp --serve /route --type get -m 'This is the /get route!' --static app/public -p 8080

Install any npm package. (global, save, save-dev)

LOCAL

Install to project dependencies

gapp -i package

Same as

npm install --save package

Install to project dev dependencies

gapp -id package

Same as

npm install --save-dev package

GLOBAL

gapp -ig package

Same as

npm install -g package

GLOBAL AND LOCAL DEPENDENCIES

gapp -igs package

Same as

npm install -g --save package

gapp -igd package

Same as

npm install -g --save-dev package

Uninstall any npm package. (global, local)

gapp -u package

Same as

npm uninstall -g package

gapp -ul package

Same as

npm uninstall package

Shell

With gapp you can combine all of the previous commands and also run shell commands chained through gapp.

gapp -r echo im running some command!

A shell command can only be strung together if it last in the chain or the only command being ran. Otherwise use quotes/singles quotes.

PROPER

gapp -ig package -u anotherpackage --gen angular -r echo im saying something!

PROPER

gapp -ig package -u anotherpackage -r 'echo im saying something!' --gen angular

IMPROPER

gapp -ig package -u anotherpackage -r echo im saying something! --gen angular

gapp is picky when it comes to subsequent variables.!

License

MIT © Google

Package Sidebar

Install

npm i gapp

Weekly Downloads

11

Version

1.4.8

License

MIT

Last publish

Collaborators

  • iansawyer