forked from pepelatz/pepelatz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (38 loc) · 1.03 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
/* eslint-disable node/no-unpublished-require */
const gulp = require('gulp');
const sass = require('gulp-sass');
const autoprefixer = require('gulp-autoprefixer');
const cssnano = require('gulp-cssnano');
const plumber = require('gulp-plumber');
const concat = require('gulp-concat');
const uglify = require('gulp-uglifyjs');
/* eslint-enable node/no-unpublished-require */
gulp.task('scss', () => {
return gulp
.src('dev/scss/**/*.scss')
.pipe(plumber())
.pipe(sass())
.pipe(
autoprefixer(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], {
cascade: true
})
)
.pipe(cssnano())
.pipe(gulp.dest('public/stylesheets'));
});
gulp.task('scripts', () =>
gulp
.src([
'dev/js/auth.js',
'dev/js/post.js',
'dev/js/comment.js'
//
])
.pipe(concat('scripts.js'))
// .pipe(uglify())
.pipe(gulp.dest('public/javascripts'))
);
gulp.task('default', ['scss', 'scripts'], () => {
gulp.watch('dev/scss/**/*.scss', ['scss']);
gulp.watch('dev/js/**/*.js', ['scripts']);
});