This is a yeoman generator for an AngularJS project using Gulp, Bower and NPM.
Includes support for Jade, Coffeescript and Less files.
app/
assets/
scripts/
app.coffee
styles/
app.sass
lib.sass
vendor/
bower_components/
templates/
index.jade
build/
css/
app.css
lib.css
js/
app.js
lib.js
index.html
specs/
node_modules/
conf.js
.bowerrc
.gitignore
bower.json
gulpgile.js
package.json
README.md
- All Jade files in
app\templates
are compiled intobuild/templates
keeping their directory structure - All Coffee files in
app\assets\scripts
are compiled and concatenated intobuild/js/app.js
- All Less files in
app\assets\styles
are concatenated intobuild/css/app.css
- All JS files in the
bower_components
folder are concatenated intobuild/js/lib.js
- All CSS files in the
bower_components
folder are concatenated intobuild/css/lib.css
index.jade
is compiled/copied tobuild/index.html
- A static server is run at port 9000 with livereload support
- When any HTML, JS or CSS file in the build folder changes, they are autoreloaded on the browser
- node.js http://nodejs.org/
- npm http://www.npmjs.org/
Go to the generator folder and exec the following command:
npm link
Yeoman will now recognize the package, just run yo initios-yeoman from another folder and you can test this generator on local.
Workaround: If "npm link" is not working for you try with
npm link generator-initios-yeoman
Build your app
mkdir my-app && cd my-app && yo initios-yeoman
Launch the server and start watching files changes
gulp launch
Now you can open your browser on http://localhost:9000
and see your app working.
Functional tests are run with Protractor.
For easier testing workflow install protractor globally:
npm install -g protractor
This will install 2 command line tools:
- protractor: run protractor tests
- webdriver-manager: Start/Stop Selenium
If is the first time you need to install selenium webdriver. On windows run
node node_modules/protractor/bin/webdriver-manager update
On UNIX run
./node_modules/protractor/bin/webdriver-manager update
Finally, to run the tests:
protractor conf.js
By default it will be runned with PhantomJs (headless browser) For debugging use chrome with:
protractor conf.js --browser chrome
Check the protractor API (which is on top of Selenium): http://angular.github.io/protractor/#/api