#nground
Starter kit for Angular + Gulp + Less applications
##Table of Contents
- Instalation
- Build Process
- Stack
- App Structure
- Testing
- Routes
- API
Run the following commands:
-
cd nground
-
sudo npm run install
-
bower install
-
gulp serve
-
Navigate to:
http://localhost:3000
- AngularJS
- angular-route
- angular-animate
- Gulp // requires nodeJS
- Karma
- Jasmine
- Protractor
^ For a detailed list, please see /bower.json
gulp
gulp js
gulp jshint
gulp css
gulp serve
If you want to have the latest version of the code in the browser, make sure to run this command:
gulp watch
This will be watching for changes in LESS files.
gulp inject
gulp test
gulp test:unit
(only unit tests)
gulp test:e2e
(only End2End tests)
gulp build:prod
(Builds the project and copy required files to the production environment)
gulp ng -app
(Creates an Angular Application)
gulp ng -module
(Creates an Angular Module)
gulp ng -directive
(Creates an Angular Directive)
gulp ng -controller
(Creates an Angular Controller)
gulp ng -factory
(Creates an Angular Factory)
|- app/ (frontend application - development environment)
| |- api/ (dummy API - mock services)
| |- assets (static files)
| | |- css
| | |- fonts (Icon Fonts)
| | |- img
| | |- js
| | | |- (put custom JS code here - not required by the Angular App)
| |- bower_components (third-pary libraries)
| |- modules (sub-systems)
| | |- config
| | | |- config.js (Global configuration)
| | | |- constants.js (Global constants)
| | |- submodule
| | | |- sub-submodule
| | | | |- (put controllers, directives, factories, services here)
| | | |- ....
| | | |- (put more modules here)
| | |- app.js (Initialization of the App)
| |- less (source LESS files)
| | |- base
| | | |- base.less (base tags)
| | | |- fonts.less (Web fonts / icon fonts)
| | | |- layout.less (Master layout)
| | |- common (shared UI components)
| | | |- buttons.less
| | | |- forms.less
| | |- config
| | | | - mixins.less (helpers)
| | | | - vars.less
| | |- elements (Custom elements)
| | | |- buttons.less
| | | |- forms.less
| | |- layout (master layout)
| | | |- footer.less
| | | |- header.less
| | | |- layout.less
| | | |- nav.less
| | |- views
| | | |- module
| | | | |- page.less
| | app.less (main LESS file)
| |- views (HTML Partials)
| | |- common
| | |- module
| |- index.html
|- public/ (frontend application - production env)
| |- assets (compiled files here)
| | |- css
| | | |- app.css
| | | |- app.min.css
| | | |- app.min.css.map
| | |- fonts (Icon Fonts)
| | | |- app.eot
| | | |- app.svg
| | | |- app.ttf
| | | |- app.woff
| | |- img
| | |- js
| | | |- app.js
| | | |- app.min.js
| | | |- app.min.js.map
| | | |- templates.js
| |- index.html
|- bower.json
|- gulpfile.js
|- package.json
To run tests, you should run the following command in your terminal:
gulp test
https://docs.angularjs.org/guide/unit-testing
We use Jasmine to perform unit testing in our app. If you want to run only unit testing, use:
gulp test:unit
After running it, you can see the results of the coverage test inside /coverage/
.
https://docs.angularjs.org/guide/e2e-testing
We use Protractor to perform e2e testing in our app. If you want to run only e2e, use:
gulp test:e2e
NOTE: To run this e2e tests, you must have installed selenium in your computer.
These are the available routes for the application.
/#/ [Homepage]
/#/foo-bar [page details]
[GET] /api/data (Get site data)
[GET] /api/user (Gets user information)
##License
MIT © Juan David Andrade