-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
49 lines (41 loc) · 1.74 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict';
/**
* Import plugins
*/
var gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
config = require('./gulp_config.json'),
runSequence = require('run-sequence');
require(config.tasks + 'vendors')(); // $ gulp vendors
require(config.tasks + 'images')(); // $ gulp img
require(config.tasks + 'styles')(); // $ gulp styles
require(config.tasks + 'scripts')(); // $ gulp scripts
require(config.tasks + 'icons')(); // $ gulp icons
require(config.tasks + 'favicons')(); // $ gulp favicons
require(config.tasks + 'clean')(); // $ gulp clean
require(config.tasks + 'styleguide')(); // $ gulp styleguide
require(config.tasks + 'server')(); // $ gulp serve
require(config.tasks + 'gh-pages')(); // $ gulp deploy
require(config.tasks + 'tests-regression')(); // $ gulp regression
require(config.tasks + 'tests-unit')(); // $ gulp test:unit
require(config.tasks + 'tests-navigation')(); // $ gulp test:navigation
/**
* Init project
*/
gulp.task('init', function() {
return gulp.src('node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss')
.pipe($.rename('bootstrap-variables.scss'))
.pipe(gulp.dest(config.assets + 'sass/'));
});
/**
* Task to build assets on production server
*/
gulp.task('build',['clean'], function() {
return gulp.start('vendors', 'styles', 'img', 'scripts', 'icons');
});
/**
* Default task
*/
gulp.task('default', ['clean'], function(done){
runSequence(['css-vendors', 'js-vendors', 'fonts-vendors', 'polyfills-vendors', 'img', 'icons', 'styles', 'scripts', 'styleguide-styles', 'styleguide-scripts'], 'favicons', 'styleguide', done);
});