Skip to content

amber init

Hannes Hirzel edited this page Jan 14, 2015 · 3 revisions

Since version 0.12 the command line version of Amber has an init command. The command is to be run in an empty directory and after asking some configuration questions creates the setup files for an Amber project.

For the Presentation project of the amber-examples project the initialisation process is as follows

$ amber init
Welcome to Amber version 0.13.0 (NodeJS 0.10.25).
Running "init:/usr/local/lib/node_modules/amber-cli/node_modules/grunt-init-amber" (init) task
This task will create one or more files in the current directory, based on the
environment and the answers to a few questions. Note that answering "?" to any
question will show question-specific help and answering "none" to most questions
will leave its value blank.

"grunt-init-amber" template notes:
 Project title should be a human-readable title.

Please answer the following:
[?] Project title (Application or Library Title) Amber Presentation
[?] Main class and package of Amber application.
Project name is derived by lowercasing this. (AmberPresentation) Presentation
[?] Description (The Application or The Library doing The Thing.) Amber Smalltalk Presentations written in Amber
[?] Author name (hhzl) Nicolas Petton and others
[?] Author email (hannes.hirzel@gmail.com) none
[?] Namespace of the new Amber package. (amber-presentation) 
[?] Version (0.1.0) 
[?] Project git repository (git://github.com/hhzl/presentation.git) https://github.com/amber-smalltalk/amber-examples.git
[?] Project homepage (https://github.com/amber-smalltalk/amber-examples) 
[?] Project issues tracker (https://github.com/amber-smalltalk/amber-examples/issues) 
[?] Author url (none) 
[?] Licenses (MIT) 
[?] Do you need to make any changes to the above before continuing? (y/N) N

Writing Gruntfile.js...OK
Writing README.md...OK
Writing deploy.js...OK
Writing devel.js...OK
Writing .gitignore...OK
Writing index.html...OK
Writing local.amd.json...OK
Writing src/Presentation.js...OK
Writing src/Presentation.st...OK
Writing src/Presentation-Tests.js...OK
Writing src/Presentation-Tests.st...OK
Writing LICENSE-MIT...OK
Writing package.json...OK

Initialized from template "grunt-init-amber".
You need to have these installed globally via npm: amber-cli_; _grunt-cli_;
_bower. Now, install project dependencies with bower install, tool
dependencies with npm install and optionally, recompile with grunt. If you
are running amber init, these three tasks are going to be performed for you
now. Afterwards, start the development server with amber serve. Your
application is then accessible via http://localhost:4000/

Done, without errors.

 

For another example see https://github.com/hhzl/Amber-snapsvg-demo (Amber version 0.14.1)

Clone this wiki locally