This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathgulpfile.js
61 lines (54 loc) · 1.66 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
50
51
52
53
54
55
56
57
58
59
60
61
const console = require('better-console');
const fs = require('fs');
const gulp = require('gulp');
const sequence = require('run-sequence');
const meta = require('./package.json');
// Import tasks
require('./tasks/clean.js');
require('./tasks/copy-files.js');
require('./tasks/help.js');
require('./tasks/highlighter.js');
require('./tasks/jshint.js');
require('./tasks/jsonlint.js');
require('./tasks/merge.js');
require('./tasks/phplint.js');
require('./tasks/scss.js');
require('./tasks/scsslint.js');
require('./tasks/setup.js');
require('./tasks/uglify.js');
require('./tasks/watch.js');
// Task combos
gulp.task('lint', ['lint:scss','lint:js', 'lint:json', 'lint:php']);
gulp.task('css', ['lint:scss','scss']);
gulp.task('debug', ['bootlint', 'jquery']);
gulp.task('init', ['copy']);
gulp.task('make', ['make:scss','make:js']);
gulp.task('travis', ['lint:js']);
gulp.task('upgrade', ['clean:pack', 'copy:css', 'copy:fonts', 'copy:js', 'copy:l10n', 'copy:php', 'copy:themes']);
// Task aliases
gulp.task('deps', ['depends']);
gulp.task('jsmin', ['make:js']);
gulp.task('minify', ['make']);
gulp.task('scssmin', ['make:scss']);
gulp.task('uglify', ['make:js']);
gulp.task('updaze', ['upgrade']);
// Default task
gulp.task('default', ['build:highlighter'], function (callback) {
setTimeout(function() {
if ( !fs.existsSync('./build/config.json') ){
console.log('\nLet\'s set this up!\n');
tasks = [
'copy',
'setup'
];
} else {
console.log('\nConfiguration file detected\nRunning upgrade…');
tasks = [
'upgrade'
];
}
sequence(
tasks, callback
);
}, 50);
});