-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
44 lines (35 loc) · 963 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
32
33
34
35
36
37
38
39
40
41
42
43
44
var gulp = require('gulp');
var watch = require('gulp-watch');
var concat = require('gulp-concat');
var jshint = require('gulp-jshint');
var less = require('gulp-less');
var path = require('path');
var appdir = './app';
var lib = 'lib/*.js';
gulp.task('lib', function() {
return gulp.src(lib)
.pipe(jshint())
.pipe(concat('m.js'))
.pipe(gulp.dest(appdir));
});
var style = 'style/*.less'
var styleAll = 'style/**/*.less'
gulp.task('style', function () {
gulp.src(style)
.pipe(less({
paths: [ path.join(__dirname, 'style', 'includes') ]
}))
.pipe(gulp.dest(appdir));
});
var readme = 'readme/*.md';
gulp.task('readme', function() {
return gulp.src(readme)
.pipe(concat('README.md'))
.pipe(gulp.dest('.'));
});
gulp.task('watch', function () {
gulp.watch(lib, ['lib']);
gulp.watch(styleAll, ['style']);
gulp.watch(readme, ['readme']);
});
gulp.task('default', ['lib', 'style', 'readme', 'watch']);