-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Grunt: refactor #566
Grunt: refactor #566
Conversation
Blendify
commented
Jan 31, 2018
•
edited
Loading
edited
- Cleanup font copying
- Create new tasks: install, docs
The |
- to many braces - Split up long path lines
Ah should work, I was rushed when I wrote this one. |
@@ -181,5 +169,7 @@ module.exports = function(grunt) { | |||
grunt.loadNpmTasks('grunt-browserify'); | |||
|
|||
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']); | |||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify','exec:build_sphinx']); | |||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removed the actual building of the docs. Was that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the way I see this is that grunt build
should just build the theme related files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with it. I just want to be sure.
Gruntfile.js
Outdated
'bower_components/robotoslab-googlefont/RobotoSlab-Bold.ttf', | ||
'bower_components/robotoslab-googlefont/RobotoSlab-Regular.ttf', | ||
'bower_components/inconsolata-googlefont/Inconsolata-Bold.ttf', | ||
'bower_components/inconsolata-googlefont/Inconsolata-Regular.ttf'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a syntax error here. A trailing comma is required.
🚢 |
@ericholscher do you agree with the changes done to the grunt tasks? |
- use build tasks for install - rename clean:build to clean:docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I don't think we have much reason to split up the font copy operations, so 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring looks good, some remarks regarding new/changed Grunt tasks.
Gruntfile.js
Outdated
@@ -181,5 +169,7 @@ module.exports = function(grunt) { | |||
grunt.loadNpmTasks('grunt-browserify'); | |||
|
|||
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']); | |||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify','exec:build_sphinx']); | |||
grunt.registerTask('build', ['clean','copy:fonts','sass:build','browserify:build','uglify']); | |||
grunt.registerTask('install', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for the new install
step? I think we should have a single command that produces a built theme with CSS and JS, completely from scratch. It looks like you're doing that with install
, but what would we need build
for then?
Gruntfile.js
Outdated
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify','exec:build_sphinx']); | ||
grunt.registerTask('build', ['clean','copy:fonts','sass:build','browserify:build','uglify']); | ||
grunt.registerTask('install', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify']); | ||
grunt.registerTask('docs', ['exec:build_sphinx','connect','open']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also call all the stuff that copies and builds assets (copy
, sass
, browserify
). The docs need these assets for proper display and they might not be there if the were clean
ed.
I decided to revert the changes that we were not sure about. Im not exactly sure what I was going for but I like how it is now. |
Do you want to keep the |