-
Notifications
You must be signed in to change notification settings - Fork 59
/
gulpfile.js
36 lines (32 loc) · 952 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
35
36
var gulp = require('gulp');
var concat = require('gulp-concat');
var eslint = require('gulp-eslint');
var babel = require('gulp-babel');
let cleanCSS = require('gulp-clean-css');
gulp.task('lint', () => {
return gulp.src(['static/js/**/*.js'])
.pipe(eslint())
.pipe(eslint.format());
});
gulp.task('build', ['js', 'css'])
gulp.task('js', () => {
return gulp.src([
'static/js/constructor.js',
'static/js/**/!(bootstrap)*.js',
'static/js/bootstrap.js',
])
.pipe(babel({
presets: ['env'],
plugins: ['transform-remove-strict-mode']
}))
.pipe(concat('filamentmanager.bundled.js'))
.pipe(gulp.dest('octoprint_filamentmanager/static/js/'));
});
gulp.task('css', () => {
return gulp.src([
'static/css/*.css',
])
.pipe(concat('filamentmanager.min.css'))
.pipe(cleanCSS())
.pipe(gulp.dest('octoprint_filamentmanager/static/css/'));
});