mojito-cli-create
Advanced tools
Comparing version 0.0.7 to 0.0.8
18
index.js
@@ -75,11 +75,16 @@ /* | ||
break; | ||
case 'demo': | ||
// Allows you to create demo apps that come with the `mojito-cli-create` package | ||
// or any demo app that you place under `archetypes/demo/`. | ||
// 2. mojito create [options] demo [quickstartguide|<your_demo_app>] <name> | ||
source = pathify(subtypePath(type, args)); | ||
err = 'The demo app you specified does not exist.'; | ||
break; | ||
case 'custom': | ||
// 2. mojito create [options] custom <path/to/archetype> <name> | ||
// 3. mojito create [options] custom <path/to/archetype> <name> | ||
source = pathify(args.shift()); | ||
err = 'Custom archetype path is invalid.'; | ||
break; | ||
default: | ||
// 3. mojito create [options] <path/to/archetype> <name> | ||
// 4. mojito create [options] <path/to/archetype> <name> | ||
// (this *should* be the only supported syntax) | ||
@@ -156,3 +161,4 @@ source = pathify(type); | ||
dest = getDestinationDir(type, dest, name); | ||
keyval.name = keyval.name || name; | ||
keyval.class = keyval.name || name; | ||
keyval.name = keyval.class.toLowerCase(); | ||
keyval.port = env.opts.port || 8666; | ||
@@ -171,3 +177,3 @@ | ||
module.exports.usage = [ | ||
'Usage: mojito create [options] <app|mojit> [full|simple|default] <name>', | ||
'Usage: mojito create [options] <app|mojit> [full|simple|default|quickstartguide] <name>', | ||
'Usage: mojito create [options] custom <path/to/archetype> <name>', | ||
@@ -174,0 +180,0 @@ 'Usage: mojito create [options] <path/to/archetype> <name>', |
@@ -6,2 +6,3 @@ /* | ||
*/ | ||
/*jshint strict:false */ | ||
var through = require('through'); | ||
@@ -8,0 +9,0 @@ |
{ | ||
"name": "mojito-cli-create", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Subcommand for mojito-cli to create mojito scaffolding/boilerplate.", | ||
@@ -17,5 +17,6 @@ "dependencies": { | ||
"lint": "jshint {.,lib}/*.js*", | ||
"pretest": "npm run clean", | ||
"test": "tap tests/index.js", | ||
"cover": "istanbul cover --dir artifacts/coverage tests", | ||
"clean": "git clean -dfX **/artifacts" | ||
"clean": "git clean -dfX {.,tests}/artifacts" | ||
}, | ||
@@ -22,0 +23,0 @@ "repository": "git://github.com/yahoo/mojito-cli-create.git", |
@@ -34,2 +34,15 @@ mojito-cli-create [![Build Status](https://travis-ci.org/yahoo/mojito-cli-create.png)](https://travis-ci.org/yahoo/mojito-cli-create) | ||
Mojito Demo Apps | ||
---------------- | ||
Mojito also offers the demo app `quickstartguide` that is an example app displaying documentation. | ||
To `quickstartguide` app, run the following: | ||
mojito create demo quickstartguide <name> | ||
You can also create your own demo apps by placing them under the `archetypes/demo` directory and | ||
then running the following command: | ||
mojito create demo <your_demo_app> <name> | ||
Custom Archetypes | ||
@@ -45,3 +58,6 @@ ----------------- | ||
* `{{port}}` -> default port number 8666 or the value passed by option `--port` | ||
* `{{name}}` -> the name passed as the last command line argument that is not a flag or option, like `--port` | ||
* `{{name}}` -> the name passed as the last command line argument that is not a flag or option, like `--port`. The | ||
name is lowercased and used for the module name of mojit code. | ||
* `{{class}}` -> is the sname as `{{name}}` except the value is not lowercased. The value is used for the class name | ||
of mojit code. | ||
@@ -48,0 +64,0 @@ You can also specify the option `--keyval` or `-k` to replace key/value pairs in a string. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
203319
90
3174
78
4
7