-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
43 lines (38 loc) · 1.46 KB
/
Copy pathgulpfile.js
File metadata and controls
43 lines (38 loc) · 1.46 KB
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
var gulp = require('gulp'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename');
/* default build */
gulp.task('default', ['buildJSRepresentations', 'buildCSS']);
/* build only the core library */
gulp.task('buildJSCore', function () {
return gulp.src(['src/structural.js'])
.pipe(gulp.dest('build'))
.pipe(rename('structural.min.js'))
.pipe(uglify())
.pipe(gulp.dest('build'));
});
/* build only the core library and included representations */
gulp.task('buildJSRepresentations', function () {
return gulp.src(['src/structural.js', 'src/representations/**/*.js'])
.pipe(concat('structural.js'))
.pipe(gulp.dest('build'))
.pipe(rename('structural.min.js'))
.pipe(uglify())
.pipe(gulp.dest('build'));
});
/* build the core library, included representations, and included algorithms */
gulp.task('buildJSRepresentationsAlgorithms', function () {
return gulp.src(['src/structural.js', 'src/representations/**/*.js', 'src/algorithms/**/*.js'])
.pipe(concat('structural.js'))
.pipe(gulp.dest('build'))
/*.pipe(rename('structural.min.js'))
.pipe(uglify())
.pipe(gulp.dest('build'));*/
});
/* concatenate css files of every representation */
gulp.task('buildCSS', function () {
return gulp.src('src/representations/**/*.css')
.pipe(concat('structural.css'))
.pipe(gulp.dest('build'));
});