-
Notifications
You must be signed in to change notification settings - Fork 54
/
gulpfile.js
39 lines (34 loc) · 1.11 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
var gulp = require('gulp'),
name = require('gulp-rename'),
rework = require('gulp-rework'),
reworkNPM = require('rework-npm'),
reworkVars = require('rework-vars'),
includer = require('gulp-htmlincluder'),
classPrefix = require('rework-class-prefix'),
media = require('rework-custom-media'),
size = require('gulp-size'),
md = require('gulp-remarkable');
gulp.task('md', function() {
return gulp.src('air.md')
.pipe(md())
.pipe(name('-markdown.html'))
.pipe(gulp.dest('example'));
});
gulp.task('html', ['md', 'css'], function() {
return gulp.src('example/*.html')
.pipe(includer())
.pipe(gulp.dest('./'));
});
gulp.task('css', function() {
return gulp.src('index.css')
.pipe(rework(reworkNPM(), classPrefix('air-'), media(), reworkVars()))
.pipe(size({ gzip: true, showFiles: true }))
.pipe(name('air.css'))
.pipe(gulp.dest('css'));
});
gulp.task('watch', function() {
gulp.watch(['*.md', '*.css'], function() {
gulp.start('default');
});
});
gulp.task('default', ['md', 'css', 'html', 'watch']);