-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
35 lines (31 loc) · 1.09 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
var gulp = require('gulp'),
sass = require('gulp-sass'),
strip = require('gulp-strip-css-comments'),
useref = require('gulp-useref'),
uglify = require('gulp-uglify'),
gulpIf = require('gulp-if'),
eslint = require('gulp-eslint'),
concat = require('gulp-concat'),
cssnano = require('gulp-cssnano'),
sequence= require('run-sequence');
///////////////////////////////////////////////////////
//////////////////////////////////////////////////////
////////////////////// ADMIN ////////////////////////
gulp.task('admin-sass', function() {
return gulp.src('resources/assets/sass/admin.scss')
.pipe(sass())
.pipe(concat('app.min.css'))
.pipe(strip())
.pipe(cssnano())
.pipe(gulp.dest('public/backend/css'))
});
gulp.task('admin-js', function() {
var source = require('./adminjs.json');
return gulp.src(source)
.pipe(concat('scripts.min.js'))
.pipe(uglify())
.pipe(gulp.dest('public/backend/js'))
});
gulp.task('admin', ['admin-js', 'admin-sass'], function() {
gulp.watch('resources/assets/sass/**/*.scss', ['admin-sass']);
});