Skip to content

Commit 9d6db31

Browse files
sttkphated
authored andcommitted
Upgrade: Update copy-props (closes #123) (#131)
1 parent 62f0269 commit 9d6db31

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/shared/config/env-flags.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ function mergeConfigToEnvFlags(env, config) {
1212
return copyProps(env, config, toFrom, convert, true);
1313
}
1414

15-
function convert(value, configKey, envKey) {
16-
if (envKey === 'configBase') {
17-
return path.dirname(value);
15+
function convert(configInfo, envInfo) {
16+
if (envInfo.keyChain === 'configBase') {
17+
return path.dirname(configInfo.value);
1818
}
19-
return value;
19+
return configInfo.value;
2020
}
2121

2222
module.exports = mergeConfigToEnvFlags;

lib/shared/config/load-files.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ function loadConfigFiles(configFiles, configFileOrder) {
1616

1717
copyProps(require(filePath), config, convert);
1818

19-
function convert(value, name) {
20-
if (name === 'flags.gulpfile') {
21-
return path.resolve(path.dirname(filePath), value);
19+
function convert(loadedInfo) {
20+
if (loadedInfo.keyChain === 'flags.gulpfile') {
21+
return path.resolve(path.dirname(filePath), loadedInfo.value);
2222
}
23-
return value;
23+
return loadedInfo.value;
2424
}
2525
}
2626

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"dependencies": {
3535
"archy": "^1.0.0",
3636
"chalk": "^1.1.0",
37-
"copy-props": "^1.4.1",
37+
"copy-props": "^2.0.1",
3838
"fancy-log": "^1.1.0",
3939
"gulplog": "^1.0.0",
4040
"interpret": "^1.0.0",

0 commit comments

Comments
 (0)