mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
1eb6d153ce
this is a buggy optimization that breaks some css
32 lines
842 B
JavaScript
32 lines
842 B
JavaScript
var gulp = require('gulp');
|
|
var less = require('gulp-less');
|
|
var path = require('path');
|
|
var minifyCSS = require('gulp-minify-css');
|
|
var rename = require('gulp-rename');
|
|
var sourcemaps = require('gulp-sourcemaps');
|
|
|
|
// now some dev nice utilities.
|
|
var livereload = require('gulp-livereload');
|
|
|
|
gulp.task('css', function () {
|
|
return gulp.src('./jupyter_notebook/static/style/*.less')
|
|
.pipe(sourcemaps.init())
|
|
.pipe(less({
|
|
paths: [ path.join(__dirname, 'less', 'includes') ]
|
|
}))
|
|
.pipe(minifyCSS({restructuring: false}))
|
|
.pipe(rename({
|
|
suffix: '.min'
|
|
}))
|
|
.pipe(sourcemaps.write('./'))
|
|
.pipe(gulp.dest('./jupyter_notebook/static/style'))
|
|
.pipe(livereload());
|
|
});
|
|
|
|
|
|
|
|
gulp.task('watch', function() {
|
|
livereload.listen();
|
|
gulp.watch('jupyter_notebook/static/**/*.less', ['css']);
|
|
});
|