bin/ directory contains some useful tools.
new-- create a new webapp instance
init-- set up development environment
build-- package application
runserver-- start development server
deploy-- deploy application
setup-repo-- configure deploy repository
Used to create a new webapp instance. A new git repo is created at the destination you specify and all the files and submodules are copied over.
Packages the application using jacker.
Output is placed in
Starts a simple node.js runserver. It serves static files from
Useful for development since jacker's development loader uses XMLHTTPRequests.
Sends any new commits to the deployment repo (see setup-repo). The scripts in
deploy/ will be run on the deployment server after changes are uploaded.
deploy -f forces a redeploy
Setup script for the deployment repo, can also be done manually. See git-remote-deploy for more info.
Clone this repository to your favorite development location and:
~/dev/webapp $ ./bin/new ../myapp ~/dev/webapp $ cd ../myapp ~/dev/myapp $ ./bin/init ~/dev/myapp $ ./bin/runserver
Point your browser to http://localhost:8080 (The development loader uses XMLHTTP requests to load required modules. You can use whatever server, just don't open the file directly since most browsers won't allow XHR's to be run in local files)
Then have a look in
app/ and edit and commit to your hearts content. The example application structure is only a suggestion, only make sure that src/main.js is your applications entry point and that app.js is loaded by your html.
When you are done:
~/dev/myapp $ ./bin/build
Copy the contents of the build folder to your deployment server or if you want to be fancy - check out the included deployment tools.