- The Boilerplate is a set of files to help you rapidly get up and running a SPA
- Helps you build your SPA which some times consumes a lot of time when starting a new SPA
- The SPA provides optional creation of Hybrid App using Apache Cordova/PhoneGap
Download https://github.com/csantanapr/dapp-boilerplate/archive/master.zip
cd dapp-boilerplate
Use NPM:
npm install
Downloads cli dependencies to node_modules/
bower install
or
volo install
Downloads browser dependencies to components/
Use grunt to run tasks, for more available tasks run grunt --help
grunt server
grunt server:dist
grunt lint
Be happy, and stop crying because you can't figure out how to build dojo or create a hybrid App as fast and simple as it should be.
Believe me I cried a lot :-(
grunt build
To build web and cordova run:
grunt build_all
To run Simulators (Apple iOS, Android) run:
grunt cordova_emulate
To run just Apple iOS Simulator run:
grunt cordovacli:emualte_ios
To run just Android Simulator run:
grunt cordovacli:emualte_android
If you have msysgit installed, run Git Bash and verify some dependencies by running the following commands:
which node
Node will reward you with much faster builds.
- The starting point of the boilerplate is the file at
src/index.html
andsrc/app/main.js
It's responsible for loading the Dojo loader and the application’s bootstrapper withconfig.json
- The task
grunt build
takes your application files and builds them for production using the Dojo build tool.- It depends on the presence of the build profile at
profiles/app.profile.js
and App configsrc/app/config.json
- It depends on the presence of the build profile at
- The App creates an instance of
dojox/app/main
using the App Controller Configuration Filesrc/app/config.json
- The provided directory structure for css, html, and js for your App is defined in config.json, you can change to a different convention
This boilerplate provides a very basic sample mobile App using using dojox.mobile widgets
For more advanced examples including integration with other JavaScript Libraries (jquery, backbone, angular, nodes, mongodb, handlebars, etc.. ) checkout this repo:
- This project started because I always spent a few weeks getting started with a new version of Dojo, and want to give a try to the MV* dApp Framework.
- This boilerplate is constantly updated to try to reflect the latest and greatest features and design patterns for developing Single Page App, but it relies heavily on information and contributions from other users.
- If you have an idea, suggestion, or problem, please report it or create a pull request! (Please note that you will need to have signed the Dojo CLA before your pull requests are accepted, for the good of us all!)
See CHANGELOG.md
- Integrate Continues Integration (CI)
- Add unit tests (i.e. Jasmine or Mocha)
- Add functional testing (Webdriver API)
- Run Unit and Functional Testing using The Intern leveraging the Intern Tutorial
- Basic boilerplate to create App generator/scaffolding for other platforms:
- Education resources on dApp website
- Screencasts
- Tutorials
The dApp Boilerplate is licensed under the same terms as the Dojo Toolkit.
- Huge thanks go out to csnover and the other contributors for the original dojo-boilerplate project.