Skip to content
New issue

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

Improving grunt watch task performance #289

Closed
wants to merge 1 commit into from

Conversation

theorise
Copy link

Addresses #287

Summary of changes:

  • Added .svg extension to image copy task.
  • Split watch task into patterns, styles and js groups.
  • Split browserSync reload into two tasks, css and js.

This has highlighted a problem with the browserSync reload task #288. I am not sure if I have messed something up here, or if this problem already exists,

@bmuenzenmeyer
Copy link
Member

Checking this out now

@bmuenzenmeyer
Copy link
Member

  • With these changes, the grunt tasks default and serve still have references to the old copy and watch tasks.

I changed

  grunt.registerTask('default', ['patternlab', 'copy:main', 'copy:styleguide']);

to

  grunt.registerTask('default', ['patternlab', 'copy:all']);

and

  grunt.registerTask('serve', ['patternlab', 'copy:main', 'copy:styleguide', 'browserSync', 'watch:all']);

to

grunt.registerTask('serve', ['patternlab', 'copy:all', 'browserSync', 'watch:patterns', 'watch:styles', 'watch:js']);

in an attempt to fix this.

  • Running grunt serve does reload styleguide when a pattern changes
  • Running grunt serve does not, however, pickup changes made to ./source/css/style.css or ./source/js/init.js

@theorise please review - perhaps I am doing something wrong? I've pushed my attempted fix to a branch of the same name as this PR.
https://github.com/pattern-lab/patternlab-node/tree/theorise-grunt-performance

@bmuenzenmeyer
Copy link
Member

closed due to lack of response and inappropriateness for this repo. moved a link to it to pattern-lab/edition-node-grunt#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants