mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Client build system: add 'grunt watch' command: automatically copies files from client/galaxy/scripts/ to static/scripts when they change in client/galaxy/scripts; add some missing files and pack scripts
This commit is contained in:
+13
-4
@@ -2,8 +2,10 @@ module.exports = function(grunt) {
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
pkg: grunt.file.readJSON( 'package.json' ),
|
||||
|
||||
// default task
|
||||
// use 'grunt copy' to copy the entire <galaxy>/client/galaxy/scripts dir into <galaxy>/static/scripts
|
||||
copy: {
|
||||
main: {
|
||||
expand: true,
|
||||
@@ -11,11 +13,18 @@ module.exports = function(grunt) {
|
||||
src: '**',
|
||||
dest: '../static/scripts/'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// use 'grunt watch' (from a new tab in your terminal) to have grunt re-copy changed files automatically
|
||||
watch: {
|
||||
// watch for changes in the src dir
|
||||
files: [ 'galaxy/scripts/**' ],
|
||||
tasks: [ 'default' ]
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-copy');
|
||||
|
||||
grunt.registerTask('default', ['copy']);
|
||||
grunt.registerTask( 'default', [ 'copy' ] );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user