Commit 41adcd8b5431e3ea35619492b283c514ee6da033

Authored by liuguangkuo
1 parent cdd4990623
Exists in master

add gulpfile

... ... @@ -15,16 +15,10 @@ var notify = require('gulp-notify');//提醒
15 15 //编译Sass
16 16 gulp.task('sass', function() {
17 17 gulp.src('./src/sass/*.scss')
18   - .pipe(sass())
  18 + .pipe(sass().on('error', sass.logError))
19 19 .pipe(minifycss())
20 20 .pipe(gulp.dest('./dist/css'));
21   -});
22   -
23   -//压缩js
24   -gulp.task('uglify', function() {
25   - gulp.src('./src/js/*.js')
26   - .pipe(uglify())
27   - .pipe(gulp.dest('./dist/js'));
  21 + .pipe(notify({ message: 'sass task complete' }));
28 22 });
29 23  
30 24 // javascript
... ... @@ -3,6 +3,7 @@
3 3 "gulp": "^3.9.1",
4 4 "gulp-coffee": "^2.3.2",
5 5 "gulp-concat": "^2.6.0",
  6 + "gulp-concat-dir": "^1.0.0",
6 7 "gulp-css-spriter": "^0.3.3",
7 8 "gulp-jshint": "^2.0.1",
8 9 "gulp-minify-css": "^1.2.4",
src/sass/m-style.scss
... ... @@ -5,13 +5,12 @@
5 5 img{
6 6 vertical-align: top;
7 7 width: 100%;
8   -
  8 +
9 9 }
10 10 body{
11 11 font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
12 12 line-height: 1;
13 13 color:#2e2e2e;
14   -
15 14 }
16 15 html {
17 16 font-size: 20px