-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add initial code to support NPM plugin module configuration lookups; … #894
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
Conversation
Here's a start on the getPluginConfig() approach that we discussed over on #850. A few notes:
Let me know what you think. Not sure if you want to merge this yet, but I figured I'd get it over to you to check out. |
* Recursively merge source onto target. | ||
*/ | ||
mergeObject( target: any, source: any ) { | ||
var deepExtend = require('deep-extend'); |
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.
Can be written as const deepExtend
, since it is not reassigned afterwards.
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 not big fan of require
here. I'd prefer a definition file and import the module using the import
syntax where needed. Don't you think so ?
Hi @brian428, |
} | ||
} | ||
}; | ||
|
||
/** | ||
* Recursively merge source onto target. | ||
*/ |
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.
A parameter documentation would be nice :) like:
/**
* Recursively merge source onto target.
* @param {any} target <short description of target>
* @param {any} source <short description of source>
*/
@brian428 any progress on this ? |
Sorry...progress on what? Adding more uses of |
Yes you're right, we forgot the essential. |
…add getPluginConfig() and mergeObject() methods to seed.config.ts; use getPluginConfig() for browser-sync and gulp-concat-css as an initial test. (mgechev#850)
I made the formatting and style changes as mentioned above. The only change I didn't tackle is the require() for |
@brian428 LGTM! |
…add getPluginConfig() and mergeObject() methods to seed.config.ts; use getPluginConfig() for browser-sync and gulp-concat-css as an initial test. (#850)