forked from Misuki-CG/bde_website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
49 lines (42 loc) · 1.26 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
42
43
44
45
46
47
48
49
// Load plugins
var gulp = require('gulp');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var cleanCSS = require('gulp-clean-css');
var notify = require('gulp-notify');
var plumber = require('gulp-plumber');
gulp.task('default', function ()
{
// Javascript
gulp.watch('resources/assets/js/**/*.js', gulp.series('js'));
// CSS / SCSS
gulp.watch('resources/assets/css/**/*.css', gulp.series('css'));
gulp.watch('resources/assets/css/**/*.scss', gulp.series('css'));
});
/**
* Javascript
*/
gulp.task('js', function()
{
return gulp.src('resources/assets/js/**/*.js')
.pipe(plumber())
.pipe(concat('app.min.js'))
.pipe(gulp.dest('public/js'))
});
/**
* SCSS
*/
gulp.task('css', function()
{
return gulp.src(['resources/assets/css/**/*.css', 'resources/assets/css/**/*.scss'])
.pipe(plumber())
.pipe(concat('style.css'))
.pipe(sass.sync())
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
.pipe(rename({suffix: '.min'}))
.pipe(cleanCSS())
.pipe(gulp.dest('public/css'))
});