mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
added watch tasks
This commit is contained in:
@@ -6,4 +6,4 @@ if (typeof window !== 'undefined') {
|
|||||||
window.habitrpgShared = module.exports;
|
window.habitrpgShared = module.exports;
|
||||||
window._ = _;
|
window._ = _;
|
||||||
window.moment = moment;
|
window.moment = moment;
|
||||||
}
|
}
|
||||||
|
|||||||
23
gulpfile.js
23
gulpfile.js
@@ -25,11 +25,13 @@ var paths = {
|
|||||||
app: './website/public/css/index.styl',
|
app: './website/public/css/index.styl',
|
||||||
staticPage: './website/public/css/static.styl' // static is a 'future' reserved word
|
staticPage: './website/public/css/static.styl' // static is a 'future' reserved word
|
||||||
},
|
},
|
||||||
dest: './website/build/'
|
dest: './website/build/',
|
||||||
|
watch: './website/public/css/*.styl'
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
src: ['./common/index.js'],
|
src: ['./common/index.js'],
|
||||||
dest: './common/dist/scripts/'
|
dest: './common/dist/scripts/',
|
||||||
|
watch: ['./common/*.js', './common/script/*.coffee']
|
||||||
},
|
},
|
||||||
sprites: {
|
sprites: {
|
||||||
src: './common/img/sprites/spritesmith/**/*.png',
|
src: './common/img/sprites/spritesmith/**/*.png',
|
||||||
@@ -45,6 +47,17 @@ var paths = {
|
|||||||
'./common/img/sprites/npc_ian.gif',
|
'./common/img/sprites/npc_ian.gif',
|
||||||
'./bower_components/bootstrap/dist/fonts/*'],
|
'./bower_components/bootstrap/dist/fonts/*'],
|
||||||
dest: './build/'
|
dest: './build/'
|
||||||
|
},
|
||||||
|
hashres: {
|
||||||
|
fileNameFormat: '${name}-${hash}.${ext}',
|
||||||
|
src: [
|
||||||
|
'website/build/*.js', 'website/build/*.css', 'website/build/favicon.ico',
|
||||||
|
'common/dist/sprites/*.png',
|
||||||
|
'common/img/sprites/backer-only/*.gif',
|
||||||
|
'common/img/sprites/npc_ian.gif',
|
||||||
|
'website/public/bower_components/bootstrap/dist/fonts/*'
|
||||||
|
],
|
||||||
|
dest: 'build/*.css'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -171,12 +184,12 @@ gulp.task('browserify', function() {
|
|||||||
.pipe(gulp.dest(paths.common.dest))
|
.pipe(gulp.dest(paths.common.dest))
|
||||||
})
|
})
|
||||||
|
|
||||||
gulp.task('watch', ['stylus'], function() {
|
gulp.task('watch', ['stylus', 'browserify'], function() {
|
||||||
// @TODO: Finish this
|
gulp.watch(paths.stylus.watch, ['stylus']);
|
||||||
|
gulp.watch(paths.common.watch, ['browserify']);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('dev', ['watch'], function() {
|
gulp.task('dev', ['watch'], function() {
|
||||||
// @TODO: Finish this
|
|
||||||
nodemon({ script: pkg.main });
|
nodemon({ script: pkg.main });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user