Brunch watch does not process files on subsequent changes while running in Vagrant/Virtualbox -
i'm working vagrant/virtualbox development environment. web project django/angularjs project front-end development scaffolding done brunch.
brunch works fine when use brunch build
command, when use brunch watch
command javascript files not processed brunch when make changes project on host machine.
i've tried using nfs folder syncing config.vm.synced_folder folder["map"], folder["to"], type: folder["type"] ||= "nfs"
, default virtualbox folder syncing neither seems work brunch watch
.
the following brunch-config.js file:
exports.config = { paths: { watched: [ 'app', 'assets', 'styles', 'vendor', ] }, files: { javascripts: { jointo: { 'javascript/app.js': /^app/, 'javascript/vendor.js': /^(vendor|bower_components)/, } }, stylesheets: { jointo: { 'styles/app.css': /^styles/, 'styles/vendor.css': /^(vendor|bower_components)/, } } }, conventions: { assets: function(path) { /** * loops every path , returns path|true|false according need * @param path file or directory's path * @returns path if directory * true if fit regular expression * false otherwise * */ if( /\/$/.test(path) ) return path; // /^app\/.*\.html/.test(path) || // regexp need return /assets[\\/]/.test(path) || /.*(?:\.eot|\.svg|\.ttf|\.woff2|\.woff)/.test(path); } }, plugins: { afterbrunch: [ 'mv public/bootstrap/dist/fonts/* public/fonts', 'rm -r public/bootstrap', 'mv public/bootstrap-material-design/dist/fonts/* public/fonts/', 'rm -r public/bootstrap-material-design', ] } }
you need enable polling-mode file watching in order detect changes across mounted file systems.
in brunch-config:
watcher: usepolling: true
Comments
Post a Comment