-
-
Notifications
You must be signed in to change notification settings - Fork 161
Change default theme to Sage & add prompt to install bower packages. #186
Conversation
Prompt for Bower too, and install if yes && bower.json exists Make sure bower is only called if there is a custom theme
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.
Other than these two small-ish changes, this looks great! Thanks!
util/wordpress.js
Outdated
@@ -255,7 +255,8 @@ function setupTheme(generator, config, done) { | |||
themePackageJson = path.join(themePath, 'package.json'); | |||
|
|||
var themeTaskFile = '', | |||
themeTaskCmd = ''; | |||
themeTaskCmd = '', | |||
BowerFile = 'bower.json'; |
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.
For consistency, can you use camel case for var names?
util/wordpress.js
Outdated
return done(); | ||
} | ||
|
||
if (config.bower && fs.existsSync(BowerFile)) { | ||
exec('bower install', function(err, stdout, sterr) { |
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 will have to be refactored. If config.bower
is true, it will result in running the lines at 287 before the bower install is complete. Probably needs flow control logic, maybe look at using https://www.npmjs.com/package/run-series?
@wesleytodd I removed the bower prompt for now so we could just merge in a new default theme. |
Looks good! I will pull it in and publish when I get home from work today. This will be a major version change, and so I will try to land the other pending PRs that are around as well. Thanks again!! |
@wesleytodd np. I'll also look into adding the bower prompt back using run-series like you suggested, but won't be able to look at it until at least this weekend. |
Also added you as a collab here :) |
@wesleytodd for #185