A template for starting front-end projects. Webpack for require system, build
pipeline, and development server. Boostrap and Handlebars.js included. No
front-end frameworks included.
- Download this template.
- Move to the
wdi/projectsdirectory, then unzip the template directory withunzip /Users/<user-name>/Downloads/browser-template-master.zip. - Rename the template directory from
browser-template-masterto<project-name>-client. - Empty
README.mdand fill with your own content. - Replace all instances of
ga-wdi-boston.browser-templatewith the name of your project. - Move into the new project and
git init. - Add all of the files in your project with the command
git add --all.- Note: This is the only time you should run this command!
- Commit all of your files with the command
git commit.- Your commit title should read
Initial commit.
- Your commit title should read
- Install dependencies with
npm install. - Create a new repository on github.com, not GitHub Enterprise.
- Name the new repository with the same name used on Step 3.
Developers should store JavaScript files in assets/scripts.
The "manifest" or entry-point is
assets/scripts/index.js. In general, only
application initialization goes in this file. It's normal for developers to
start putting all code in this file, but encourage them to break out different
responsibilities and use the require syntax put references where they're
needed.
Developers should set apiUrls.production and apiUrls.development in
config/environment.js. With
apiUrls set, developers may rely on apiUrl as the base for API
URLs.
Developers should store styles in assets/styles and load them
from assets/styles/index.scss. Bootstrap version 3 is
included in this template.
Developers should use getFormFields to retrieve form data to send to an API.
To deploy a browser-template based SPA, run grunt deploy.
Developers should run these often!
grunt nagor justgrunt: runs code quality analysis tools on your code and complainsgrunt make-standard: reformats all your code in the JavaScript Standard Stylegrunt <server|serve|s>: generates bundles, watches, and livereloadsgrunt test: runs any automated tests, depends ongrunt buildgrunt build: place bundled styles and scripts whereindex.htmlcan find them
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].