mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
69d86dccc7
Is usefull mostly for css, but will be for typscript too.
32 lines
820 B
JavaScript
32 lines
820 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())
|
|
.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']);
|
|
});
|