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\templatesare compiled intobuild/templateskeeping their directory structure - All Coffee files in
app\assets\scriptsare compiled and concatenated intobuild/js/app.js - All Less files in
app\assets\stylesare concatenated intobuild/css/app.css - All JS files in the
bower_componentsfolder are concatenated intobuild/js/lib.js - All CSS files in the
bower_componentsfolder are concatenated intobuild/css/lib.css index.jadeis 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 linkYeoman 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-yeomanBuild your app
mkdir my-app && cd my-app && yo initios-yeomanLaunch the server and start watching files changes
gulp launchNow 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 protractorThis 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 updateOn UNIX run
./node_modules/protractor/bin/webdriver-manager updateFinally, to run the tests:
protractor conf.jsBy default it will be runned with PhantomJs (headless browser) For debugging use chrome with:
protractor conf.js --browser chromeCheck the protractor API (which is on top of Selenium): http://angular.github.io/protractor/#/api