mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 11:36:45 +00:00
Used event-stream for stylus task
This commit is contained in:
parent
4339fd7982
commit
1846dacd5f
2 changed files with 11 additions and 9 deletions
18
gulpfile.js
18
gulpfile.js
|
|
@ -9,7 +9,7 @@ var gulp = require('gulp'),
|
|||
nodemon = require('gulp-nodemon'),
|
||||
karma = require('karma').server,
|
||||
stylus = require('gulp-stylus'),
|
||||
filter = require('gulp-filter'),
|
||||
es = require('event-stream'),
|
||||
nib = require('nib'),
|
||||
minifycss = require('gulp-minify-css'),
|
||||
hash = require('gulp-hash'),
|
||||
|
|
@ -29,8 +29,10 @@ var paths = {
|
|||
dest: "./website/build"
|
||||
},
|
||||
stylus: {
|
||||
src: ['./website/public/css/index.styl',
|
||||
'./website/public/css/static.styl'],
|
||||
src: {
|
||||
app: './website/public/css/index.styl',
|
||||
staticPage:'./website/public/css/static.styl'
|
||||
},
|
||||
dest: './website/build/',
|
||||
watch: './website/public/css/*.styl'
|
||||
},
|
||||
|
|
@ -89,11 +91,11 @@ gulp.task('clean', function() {
|
|||
});
|
||||
|
||||
gulp.task('stylus', function() {
|
||||
var appFilter = filter(['*', '!static.styl']);
|
||||
return gulp.src(paths.stylus.src)
|
||||
.pipe(appFilter)
|
||||
.pipe(rename('app.styl'))
|
||||
.pipe(appFilter.restore())
|
||||
return es.merge(
|
||||
gulp.src(paths.stylus.src.app)
|
||||
.pipe(rename('app.styl')),
|
||||
gulp.src(paths.stylus.src.staticPage)
|
||||
)
|
||||
.pipe(stylus({use: [nib()]}))
|
||||
.pipe(gulp.dest(paths.stylus.dest));
|
||||
});
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@
|
|||
"coffeeify": "^0.6.0",
|
||||
"csv": "~0.3.6",
|
||||
"deep-diff": "~0.1.4",
|
||||
"event-stream": "^3.2.2",
|
||||
"expect.js": "~0.2.0",
|
||||
"git-changelog": "colegleason/git-changelog",
|
||||
"glob": "^4.3.5",
|
||||
"gulp-concat": "^2.4.3",
|
||||
"gulp-cssmin": "^0.1.6",
|
||||
"gulp-csso": "^1.0.0",
|
||||
"gulp-filter": "^2.0.0",
|
||||
"gulp-hash": "^2.0.3",
|
||||
"gulp-minify-css": "^0.4.2",
|
||||
"gulp-nodemon": "^1.0.5",
|
||||
|
|
|
|||
Loading…
Reference in a new issue