A collection of configurable gulp tasks we use to build front-end code, mostly for fully static or CMS-based website projects, using gulp-task-maker.
⚠ Requires Node.js 6.5 or later.
- less: compile Less stylesheets
- mincss: concatenate and minify CSS
- minjs: concatenate and minify JS code
- sass: compile Sass stylesheets
- svgsymbols: build SVG symbol sprites
- Download a ZIP of this repo and unzip it in your projet directory.
- Change the main config in
gulpfile.js
as needed. - Finally, in a command prompt, go to your project dir and run:
npm install
.
npm run build
: build assets oncenpm run watch
: run in the background and build assets when source files are changed
You should see something like this:
$ npm run build
> [email protected] build ~/my-project
> gulp build
[13:38:12] Using gulpfile ~/my-project/gulpfile.js
[13:38:12] Starting 'build'...
[13:38:12] Starting 'build_sass'...
[13:38:12] Starting 'build_minjs'...
[13:38:12] Starting 'build_svgsymbols'...
[13:38:13] ./dist/ main.js 30 B
[13:38:13] ./dist/ main.css 21 B
[13:38:13] ./dist/ icons.svg 418 B
[13:38:13] ./dist/ icons.svg.html 19.5 kB
[13:38:13] Finished 'build_sass' after 168 ms
[13:38:13] Finished 'build_minjs' after 168 ms
[13:38:13] Finished 'build_svgsymbols' after 169 ms
[13:38:13] Finished 'build' after 171 ms