Skip to content

Folder overview

David Storey edited this page Apr 30, 2018 · 7 revisions

The root folder

The root of the boilerplate should include the following folders:

  • dist - This is where code is compiled to, you should never create or modify files here manually
  • gulp-tasks - Most of the Gulp code for the boilerplate lives here, unless you need to modify the boilerplate you don't need to worry about this folder
  • node_modules - Used by node for powering Gulp, etc - this is installed by "npm install" - you should "never" need to create or modify files here manually
  • src - All of your development work should take place here
  • release - This is for storing a copy of /dist that is suitable for deployment to production, running "npm release" will copy the contents of /dist into /release (you still need to run "npm build" first)

There are various files in this root folder as well - built.bat, gulpfile.js, package.json etc - these are used by Gulp and as with "gulp-tasks", unless you need to modify the behaviour of the Gulp setup, you shouldn't need to touch or worry about any of these files (you may wish to update README.md of course).

The "src" folder

This is where all the development work should take place. Files here are then copied or processed by Gulp to produce the contents of the "dist" folder.

It will contain the following folders:

  • data - JSON files referenced by the HTML templating should live here, this folder will not end up in "dist"
  • images - Image files - JPGs, PNGs, SVGs, etc should live here. During the "develop" task they will just be copied, but during the "build" task they will be optimised before reaching the "dist" folder.
  • pages - HTML files should all go here. The contents will go through HTML templating before being copied to the root of the "dist" folder.
  • includes - Template files referenced by the HTML templating should live here, this folder will not end up in "dist"
  • scripts - JavaScript files should all live here
  • styles - SASS files should all live here

Files at the root of this folder will be copied directly to the "dist" folder - note that HTML files should go in the /pages folder though.

Clone this wiki locally