Yeoman generator for Ambition.
To install Yeoman:
npm install -g yo
To install the Ambition generator:
npm install -g generator-ambition
Using the Ambition generator is simple:
yo ambition
To run tests:
npm test
To build your project (compiles js and/or css to the build
directory):
npm run build
The Ambition generator will ask you several questions and generate app scaffolding based on your answers.
The name of your project. Used to create folder and file names.
True to include Stylus for automatic compilation. Save your .styl
files to the style
directory. The resulting css is saved to build/project-name.css
.
True to include jQuery in the project. The jQuery files are saved to lib/jquery
.
True to include the Traceur compiler and runtime. The runtime files are saved to lib/traceur
.
True to automatically run your Jasmine tests on Browserstack. You must set appropriate BROWSERSTACK_USERNAME
and BROWSERSTACK_KEY
enviornment variables before testing. This task is ignored if both variables are not set.
True to exclude JS compilation and testing tools from your project.
Save .styl
files to the style
directory. Save .js
files to appropriate modules in the src
directory. Save tests in each module's tests
directory.
Example file tree (with included CSS and jQuery):
.
├── bower.json
├── build
│ ├── my-app.js
│ └── my-app.css
├── gruntfile.js
├── lib
│ └── jquery
│ ├── MIT-LICENSE.txt
│ ├── bower.json
│ ├── jquery.js
│ ├── jquery.min.js
│ └── jquery.min.map
├── package.json
├── src
│ └── my-app
│ ├── app.js
│ └── tests
│ └── app_tests.js
└── style
└── variables
└── all.styl