Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan Zhu <picturepan2@hotmail.com>2016-04-18 14:25:21 +0300
committerYan Zhu <picturepan2@hotmail.com>2016-04-18 14:25:21 +0300
commit0c1b1641e07cab0d511ba73e96fb89f7cb042a81 (patch)
tree76e4d2b6e92fe3b80a71e485e8022b70a34378b9 /gulpfile.js
parente0a782cb662e26a713bc3832348fa7c339fea03e (diff)
add gulp support
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js
new file mode 100644
index 0000000..b1f4d4f
--- /dev/null
+++ b/gulpfile.js
@@ -0,0 +1,28 @@
+var gulp = require('gulp');
+var less = require('gulp-less');
+var cleancss = require('gulp-clean-css');
+var csscomb = require('gulp-csscomb');
+var rename = require('gulp-rename');
+var LessPluginAutoPrefix = require('less-plugin-autoprefix');
+
+var autoprefix= new LessPluginAutoPrefix({ browsers: ["last 2 versions"] });
+
+gulp.task('watch', function() {
+ gulp.watch('./**/*.less', ['build']);
+});
+
+gulp.task('build', function() {
+ gulp.src('./*.less')
+ .pipe(less({
+ plugins: [autoprefix]
+ }))
+ .pipe(csscomb())
+ .pipe(gulp.dest('./dist'))
+ .pipe(cleancss())
+ .pipe(rename({
+ suffix: '.min'
+ }))
+ .pipe(gulp.dest('./dist'))
+});
+
+gulp.task('default', ['build']); \ No newline at end of file