This is KaiOS application boilerplate in angularJS 1.6, naviBoardJS and Gulp. Folder structure based on best practices from Angular team. We have used naviBoardJS for smooth spatial-navigation to avoid too much of redundant code for handling keypad based navigation.
- Each component should be made as reusable component, with its style, markup and services together
- Folders should be organized based on the component, not based on the type of files
- Use Gulp to combine & minify CSS & JS
| assets
| img
| css
| app.css
| dist
| assets
| img
| data
|*.json
| components
| css
| bundle.js
| app.min.css
| manifest.webapp
| index.html
| data
|*.json
| js
|app
| app.js
| Constants.js
|generic
| *.js
| toastr.min.js
| index.html
| components
└─── home
| home.html
| home.css
| home.js
services
| *.js
lib
| lib.min.js
package.json
gulpfile.js
index.html
manifest.webapp
.gitignore
- Clone the repository, then navigate to the folder
- Run
npm install
- Run
npm run build
to build thedist
files to make it ready to run - Run
npm run start
to start web server. - Web Server runs on
http://localhost:8000
npm run build
-> developement build , similarlynpm run build:prod
respectively will give a dist folder(desired build) in the main project with associated environment Constants.js.- Put the respective constants in the data/Constants.json according to the desired build.This will help to frame the Constants.js in js/app.