forked from miniMAC/magic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
54 lines (46 loc) · 1.19 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
50
51
52
53
54
// NPM
/*
npm install gulp
npm install --save-dev gulp-clean-css
npm install --save-dev gulp-concat
npm install --save-dev gulp-notify
short syntax: npm install --save-dev gulp-clean-css gulp-concat gulp-notify
*/
var gulp = require('gulp');
cleanCSS = require('gulp-clean-css'), // minimize CSS
concat = require('gulp-concat'), // concat files
notify = require('gulp-notify') // simple notify
/**
* CSS Styles
*/
gulp.task('magicCSS', function () {
return gulp.src([
'./css/base.css',
'./css/**/*.css'
]) // take all CSS files
.pipe(concat('magic.css')) // Create the CSS
.pipe(gulp.dest('./')) // destination path
.pipe(notify({
message: 'magic CSS, created!',
onLast: true,
sound: 'Pop'
})
) // Simple Notify
});
gulp.task('magicCSSmin', function () {
return gulp.src([
'./css/base.css',
'./css/**/*.css'
]) // take all CSS files
.pipe(concat('magic.min.css')) // Create the CSS
.pipe(cleanCSS()) // minimize CSS
.pipe(gulp.dest('./')) // destination path
.pipe(notify({
message: 'magic CSS minifyed version, created!',
onLast: true,
sound: 'Pop'
})
) // Simple Notify
});
// Default Task
gulp.task('default', ['magicCSS', 'magicCSSmin']);