-
Notifications
You must be signed in to change notification settings - Fork 8
/
gulpfile.js
35 lines (29 loc) · 924 Bytes
/
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
const gulp = require('gulp');
const gutil = require('gulp-util');
const concat = require('gulp-concat');
const exec = require('child_process').exec;
const filesConcatArray = [
'node_modules/cytoscape/dist/cytoscape.min.js',
'node_modules/numeric/numeric-1.2.6.min.js',
'node_modules/layout-base/layout-base.js',
'node_modules/cose-base/cose-base.js',
'node_modules/cytoscape-grid-guide/cytoscape-grid-guide.js',
'icons.js',
'code.js',
];
gulp.task('icons', function(cb) {
exec('node ./convert.js', function(err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
});
gulp.task('concat', (done) => {
gulp.src(filesConcatArray)
.pipe(concat('code-full.min.js'))
.pipe(gulp.dest('dist'))
.on('error', gutil.log);
done();
});
gulp.task('default', gulp.series('icons', 'concat'));
gulp.task('dist/code-full.min.js', gulp.series('icons', 'concat'));