This is a bundle for Frontend-starter with default directory structure.
Before start you need:
- Bower
- Git, e.g. Github desktop
Install Frontend-starter, then unpack this repo to the desired project location (if you clone, you'd rather want to remove the .git
directory, because as it is just a kind of template, it won't be under version control). Remember not to use a directory containing an exclamation mark (!) - it breaks glob patterns used by the tasks.
Then run:
bower install
On Windows, remember to run Bower from Git Shell. Bower files are by default placed in bower_components
- to change this, edit the .bowercc
file and change dirs.bower
config definition.
Then use the Frontend-starter gulp tasks. For example, for the first init, use:
frs start
To fully customize directory structure and other parameters, see the docs config section.
## Directory structure of the `src/`:
Font files for font-face generation.
Your images, that will be optimized and saved in the dist directory.
Image sprites, see more in the Sprites section.
All your JavaScript files (including those installed with Bower) are by default concatenated into one file: app.js
. Thanks to this, you don't have to change markup when adding/removing any files or packages.
By default, jQuery@2 is installed.
/vendor/js
contains third-party scripts, that you can't or don't want to install via Bower - they are watched and handled separately and prepended to the app.js
file.
If you want to skip any of the Bower packages, you have 2 options:
- create a comp that uses selected packages, set its
filename
tonull
andexcludeIn
totrue
- use the
overrides
option inbower.json
file or edit configurationconfig.js.mainBowerFiles.overrides
value (see main-bower-files docs).
A simple directory structure is taken from SASS-starter.
By default, the following libraries are included:
- meyer-reset - provides CSS reset
- Breakpoint for convenient media queries handling
- SASS-core - mixins and functions such as: automatic rem/vw/percentage unit converters for dimensions and fonts, responsive sprites, grids
If you don't need any of them:
- remove the dependency from the
bower.json
file - remove import from
styles/style.scss
Place any third-party scripts that you can't or don't want to install via Bower in /vendor/styles
.
Sprites are generated automatically by gulp-spritesmith for all images placed in the /sprites
directory. To use a sprite, you have to uncomment the line in style.scss
with sprite sheet import and then use the mixin @include sprite($filename)
. See more in Frontend-starter sprite docs and SASS-core docs.