This repository was archived by the owner on Feb 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration: Scaffold
Chad Watson edited this page Nov 14, 2015
·
10 revisions
Make sure your scaffold is set up before you run gulp init
.
Eta uses the scaffold object to handle paths. Below is the default configuration. Override them to meet your needs. source.root
and assets.root
are relative to directory of your gulpfile
, and all subsequent directories are respectively relative to source.root
and assets.root
.
If you want an asset
to be in the root of your app (where your gulpfile lives) then set it to '/'
.
Defaults:
config.scaffold = {
source: {
root: '_src',
images: 'images',
browserify: 'js',
sprites: 'sprites',
sass: 'sass',
symbols: 'symbols',
static: 'static'
},
assets: {
root: 'assets',
images: 'images',
sprites: 'images/sprites',
browserify: 'js',
sass: '/',
symbols: 'fonts/symbols',
static: '/'
}
};
The default folder structure looks like this:
├───_src
│ ├───images
│ ├───js
│ ├───sprites
│ ├───sass
│ ├───symbols
│ └───static
├───assets
│ ├───images
│ │ └───sprites
│ ├───js
│ └───fonts
│ └───symbols
├───gulpfile.js
├───style.css // styles go to app root by default
├───index.html // created from the static task
└───node_modules
Checkout the examples for some common configurations.
If you need your assets folder to live in a /public
folder:
options.scaffold.assets.root = 'public/assets';
If you want to rename your source folder:
options.scaffold.source.root = 'source';
If you want your CSS files in the assets folder:
options.scaffold.assets.sass = 'css';
If you want to rename your source js folder:
options.scaffold.source.browserify = 'scripts';