-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
31 lines (27 loc) · 896 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
var gulp = require( 'gulp' ) ,
rename = require( 'gulp-rename' ),
uglify = require( 'gulp-uglify' ),
compass = require( 'gulp-compass' ),
minifyCSS = require( 'gulp-minify-css' ),
cssmin = require( 'gulp-cssmin' ) ;
gulp.task( 'compass' , function() {
gulp.src( './static/css/base.scss' )
/*.pipe( minifyCSS( { keepSpecialComments : '*' } ) )*/
.pipe( compass( {
config_file: './config.rb',
css: 'static/css',
sass: 'static/css'
} ) )
/*.pipe( rename( 'base.min.css' ) )*/
.pipe( gulp.dest( './static/css/' ) ) ;
});
gulp.task( 'uglify', function() {
gulp.src( './static/js/common.js' )
.pipe( uglify() )
.pipe( rename( 'common.min.js' ) )
.pipe( gulp.dest( './static/js/' ) ) ;
} ) ;
gulp.task( 'watch', function() {
gulp.watch( './static/js/common.js', ['uglify'] ) ;
gulp.watch( './static/css/base.scss', ['compass'] ) ;
} ) ;