2015-04-15 05:35:43 +08:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var less = require('gulp-less');
|
|
|
|
var path = require('path');
|
|
|
|
var minifyCSS = require('gulp-minify-css');
|
|
|
|
var rename = require('gulp-rename');
|
2015-04-16 05:32:16 +08:00
|
|
|
var sourcemaps = require('gulp-sourcemaps');
|
2015-04-15 05:35:43 +08:00
|
|
|
|
2015-04-16 05:32:16 +08:00
|
|
|
gulp.task('css', function () {
|
2015-04-15 05:35:43 +08:00
|
|
|
return gulp.src('./jupyter_notebook/static/style/*.less')
|
2015-04-16 05:32:16 +08:00
|
|
|
.pipe(sourcemaps.init())
|
2015-04-15 05:35:43 +08:00
|
|
|
.pipe(less({
|
|
|
|
paths: [ path.join(__dirname, 'less', 'includes') ]
|
|
|
|
}))
|
|
|
|
.pipe(minifyCSS())
|
|
|
|
.pipe(rename({
|
|
|
|
suffix: '.min'
|
|
|
|
}))
|
2015-04-16 05:32:16 +08:00
|
|
|
.pipe(sourcemaps.write())
|
2015-04-15 05:35:43 +08:00
|
|
|
.pipe(gulp.dest('./jupyter_notebook/static/style'));
|
|
|
|
});
|
2015-04-16 05:32:16 +08:00
|
|
|
|