Amber Project Template
This is a template that you can use for easily creating your own Amber-based project.
My Amber project is linked into the template as a git submodule (lib/amber). I have a few changes to the amber.js to get the loads to work correctly while using Amber as a submodule. See Working with submodules for more information about using submodules on github.
Instead of loading code from .js files, the .st files are directly loaded into amber using the AmberProjectImporter. It is no longer necessary to save the js/*.js in git. When you deploy your project you will want to grab the appropriate js files and copy them into the lib structure.
The node server script has been linked in the top-level for convenience.
Create a git repository for your project and copy the contents of the template into the repository:
curl -L https://github.com/dalehenrich/amber-project-template/zipball/master >> template.zip unzip template.zip rm template.zip mkdir myProject mv dalehenrich-amber-project-template-*/* myProject rm -rf dalehenrich-amber-project-template-* cd myProject git init git add . rm -rf lib/amber git submodule add git://github.com/dalehenrich/amber.git lib/amber git commit -a -m"first commit"
Fire up the amber node server:
cd myProject ./bin/server
Follow instructions for Writing my first app, with the following caveats:
- use the AmberProjectPackage class as your starting point, since it is already wired into the index.html file.
- file saved during a commit will be saved into the st directory in the root of your project and the .js files in the js directory will not be saved in git.