Skip to content

Commit f04fd26

Browse files
committed
fix(cli): add custom install logic to edition-node
1 parent e39e301 commit f04fd26

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/cli/bin/install-edition.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,26 @@ const installEdition = (edition, config, projectDir) => {
4949
}
5050
// 4.2
5151
case '@pattern-lab/edition-node': {
52+
const editionPath = path.resolve('./node_modules', edition);
53+
const editionConfigPath = path.resolve(
54+
editionPath,
55+
'patternlab-config.json'
56+
);
57+
58+
const editionConfig = require(editionConfigPath);
59+
5260
pkg.scripts = Object.assign(
5361
{},
5462
pkg.scripts || {},
5563
yield getJSONKey(edition, 'scripts')
5664
);
65+
66+
yield copyAsync(
67+
path.resolve(editionPath, '/helpers/test.js'),
68+
path.resolve(sourceDir, '../', 'helpers/test.js')
69+
);
70+
71+
config = merge(config, editionConfig);
5772
break;
5873
}
5974
// 4.3

0 commit comments

Comments
 (0)