Skip to content

dalehenrich/amber-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Amber Project Template This is a template that you can use for easily creating your own Amber-based project.

##Features

  1. 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.

  2. The amber launch script has been modified so that you can store your project st/*.st files separate from the amber .st and .js artifacts.

  3. 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.

  4. The node server script has been linked in the top-level for convenience.

##Installation

  1. 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"
  1. Install node (extracted from: Getting Started page on Amber wiki):
  • Installing Node on Linux can be done using your package tool of choice ("apt-get install nodejs" for example) or any other way described at the download page.
  • Installing Node on MacOS or Windows is probably done best by using the installers at download from Nodejs.org.
  1. Fire up the amber node server:
  cd myProject
  ./bin/server 
  1. 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.