We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to set up different watch configurations for dev vs prod What am I missing?
Verifying property watch.dev.files exists in config...ERROR >> Unable to process task. Warning: Required config property "watch.dev.files" missing.
concurrent: { dev: { tasks: ['nodemon', 'watch:dev'], options: { logConcurrentOutput: true } }, prod: { tasks: ['nodemon', 'watch:prod'], options: { logConcurrentOutput: true } } },
watch: { prod: { js: { files: [ 'editor/js/**/*.js' ], tasks: ['copy:build', 'concat', 'uglify', 'attachCopyright:js'] }, sass: { files: [ 'editor/sass/**/*.scss' ], tasks: ['sass', 'attachCopyright:css'] }, json: { files: [ 'nodes/core/locales/en-US/messages.json', 'red/api/locales/en-US/editor.json', 'red/runtime/locales/en-US/runtime.json' ], tasks: ['jsonlint:messages'] }, keymaps: { files: [ 'editor/js/keymap.json' ], tasks: ['jsonlint:keymaps', 'copy:build'] }, misc: { files: [ 'CHANGELOG.md' ], tasks: ['copy:build'] } }, dev: { js: { files: [ 'editor/js/**/*.js' ], tasks: ['copy:build', 'concat', 'babel'] }, sass: { files: [ 'editor/sass/**/*.scss' ], tasks: ['sass', 'attachCopyright:css'] }, json: { files: [ 'nodes/core/locales/en-US/messages.json', 'red/api/locales/en-US/editor.json', 'red/runtime/locales/en-US/runtime.json' ], tasks: ['jsonlint:messages'] }, keymaps: { files: [ 'editor/js/keymap.json' ], tasks: ['jsonlint:keymaps', 'copy:build'] }, misc: { files: [ 'CHANGELOG.md' ], tasks: ['copy:build'] } }
The text was updated successfully, but these errors were encountered:
This is too many levels deep.
watch: { prod: { js: {
Can you prefix your watch tasks with 'prod_' or 'dev_', then call them like so:
tasks: ['nodemon', 'watch:dev_js', 'watch:dev_sass']
Sorry, something went wrong.
tasks: ['nodemon', 'watch:dev_js', 'watch:dev_sass'] doesn't work, it will only run the first watch task (watch:dev_js in this case)
Hey i had the same issue and did the same logic as you but that didn't work. The working solution and working like a charm is this one: https://stackoverflow.com/questions/13833196/gruntjs-watch-different-folders-and-execute-tasks Hope this helps. you need to install the grunt plugin: https://www.npmjs.com/package/grunt-focus then add like you tried with concurrent: this code
focus: { develop: { include: ['dev'] }, master: { include: ['prod'] }, },
and make ure tasks like this:
grunt.registerTask('dev', 'compile develop', ['focus:develop']); grunt.registerTask('prod', 'compile production', ['focus:master']);
No branches or pull requests
Trying to set up different watch configurations for dev vs prod
What am I missing?
The text was updated successfully, but these errors were encountered: