mojito-cli
v0.2.0
Published
The mojito-cli package provides command line helpers for Mojito developers.
Downloads
14
Keywords
Readme
mojito-cli
mojito-cli
is a command-line tool for Mojito application developers.
The components of mojito
that are unrelated to the core library and runtime will be moving to separate packages.
* * * For more information on the command-line package changes and the current status, see the mojito-cli Wiki. * * *
Install mojito-cli
With npm, do the following:
$ npm install --global mojito-cli
Confirm that
mojito-cli
has been installed.$ mojito help
Note that if mojito
was already installed globally, it will be uninstalled. It is recommended to only
install the core mojito
package as a local dependency in your Mojito application. Users should not
lose any functionality.
Quick Start
Create an app (which installs
mojito
locally using npm) and a mojit.$ mojito create app myapp $ cd myapp $ mojito create mojito hellomojit
Start the server.
$ mojito start
In a browser, open the following URL:
http://localhost:8666/@hellomojit/index
Commands
help
To show top-level help for this command-line tool:
$ mojito help
To show help for a specific command:
$ mojito help <command>
version
To show the version for mojito-cli
:
$ mojito version
To show the version of an application, run the following from the application directory:
$ mojito version app
The version of the mojito runtime installed locally to your app will be displayed as well.
To show the version of a mojit, run the following from the application directory:
$ mojito version mojit <mojit-name>
create
To generate boilerplate files from the Mojito archetypes or other templates:
$ mojito create [options] <type> [subtype] <name>
$ mojito create [options] <from> <to>
To learn how to do some simple key/value replacement, see mojito-cli-create.
build
To generate a static snapshot of your Mojito application:
$ mojito build [options] html5app [dest]
See mojito-cli-build for more information.
doc
To generate API documentation using yuidocjs:
$ mojito doc [options] <app|mojit|mojito> [name]
See also mojito-cli-doc.
jslint
To find common coding pitfalls with static analysis using jslint:
$ mojito jslint [app|mojit] <path>
See mojito-cli-jslint.
start
To start the server and run the application:
$ mojito start [<port>] [--context key1:value1,key2:value2]
The port number specified in the command above overrides the port number in the application
configuration file, application.json
. The default port number is 8666.
See Specifying Context
to learn how to use the --context
option.
See mojito-cli-start.
test
To run unit tests for a Mojito application:
$ mojito test app
To run unit tests for a specific mojit:
$ mojito test mojit <mojit-name>
Or:
$ mojito test mojit <mojit-path>
See mojito-cli-test for more details.
other...
When you are in the top level of a Mojito application directory, you can perform other Mojito
commands which are delegated to the locally installed mojito
package. More information is provided
in Mojito Command Line.
Node packages accessible via require
that begin with mojito-cli-
can also be invoked,
similar to git
, brew
, and yogi
. For example, if mojito-cli-foo
is installed in your $NODE_PATH
,
then mojito foo
will invoke it.
Discussion/Forums
http://developer.yahoo.com/forum/Yahoo-Mojito
Licensing and Contributions
This software is free to use under the Yahoo! Inc. BSD license. See LICENSE.txt. To contribute to the Mojito project, please see Contributing.
The Mojito project is a meritocratic, consensus-based community project, which allows anyone to contribute and gain additional responsibilities.