Simple starting project skeleton for an AngularJS app.
Supports Gulp and NPM.
This skeleton is intended to be used with an AngularJS app based on a component approach, although it may work also with the classic approach (not tested).
Fork this repo from inside GitHub, or simply download the .zip bundle with the contents inside.
- Download and install Node.js here for Windows or for Mac.
- Install Gulp CLI on the command-line with
npm install -g gulp
- Open the project folder in Terminal and run:
npm install
Please consider using this basic folder structure:
- app
|___ fonts
|___ imgs
|___ js
|___ sass
- cache
- dist
if you don't create dist and cache folder, they will be created on startup
All the html files included inside the app folder will be parsed, minified and included in template.js cache file inside cache folder. Whenever you need to use the templateUrl property inside a component or a directive, you can just simply use this syntax:
./file-name.html
This is because in the dist folder every template file will be included in the compiled app.js with all your application. The package gulp-angular-templatecache is the responsible for this feature.
Adjust the Gulp file in case you want to adjust the folder structure.
Inside the Gulp file you can change basic settings editing the "variable definitions" area.
The terminal commands to start using the project
npm start
npm run deploy
npm clear:cache
Please consider this starting project as it is. No support is given and improvements are always welcome.
Thanks to these repos for inspiring this project: