docker_manager/manager-client/tasks/options/watch.js

54 lines
1.5 KiB
JavaScript

var Helpers = require('../helpers'),
filterAvailable = Helpers.filterAvailableTasks,
LIVERELOAD_PORT = 35729,
liveReloadPort = (parseInt(process.env.PORT || 8000, 10) - 8000) + LIVERELOAD_PORT;
var docs = '{app}/**/*.{js,coffee,em}',
scripts = '{app,tests,config}/**/*.{js,coffee,em}',
templates = 'app/templates/**/*.{hbs,handlebars,hjs,emblem}',
sprites = 'app/sprites/**/*.{png,jpg,jpeg}',
styles = 'app/styles/**/*.{css,sass,scss,less,styl}',
indexHTML = 'app/index.html',
other = '{app,tests,public}/**/*',
bowerFile = 'bower.json',
npmFile = 'package.json';
module.exports = {
scripts: {
files: [scripts],
tasks: ['lock', 'buildScripts', 'unlock']
},
templates: {
files: [templates],
tasks: ['lock', 'buildTemplates:debug', 'unlock']
},
sprites: {
files: [sprites],
tasks: filterAvailable(['lock', 'fancySprites:create', 'unlock'])
},
styles: {
files: [styles],
tasks: ['lock', 'buildStyles', 'unlock']
},
indexHTML: {
files: [indexHTML],
tasks: ['lock', 'buildIndexHTML:debug', 'unlock']
},
docs: {
files: [docs],
tasks: ['lock', 'buildDocs', 'unlock']
},
other: {
files: [other, '!'+scripts, '!'+templates, '!'+styles, '!'+indexHTML, bowerFile, npmFile],
tasks: ['lock', 'build:debug', 'unlock']
},
options: {
// No need to debounce
debounceDelay: 0,
// When we don't have inotify
interval: 100,
livereload: liveReloadPort
}
};