Skip to content

Commit

Permalink
fix(cli): add custom install logic to edition-node
Browse files Browse the repository at this point in the history
  • Loading branch information
bmuenzenmeyer committed Aug 23, 2019
1 parent e39e301 commit f04fd26
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/cli/bin/install-edition.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,26 @@ const installEdition = (edition, config, projectDir) => {
}
// 4.2
case '@pattern-lab/edition-node': {
const editionPath = path.resolve('./node_modules', edition);
const editionConfigPath = path.resolve(
editionPath,
'patternlab-config.json'
);

const editionConfig = require(editionConfigPath);

pkg.scripts = Object.assign(
{},
pkg.scripts || {},
yield getJSONKey(edition, 'scripts')
);

yield copyAsync(
path.resolve(editionPath, '/helpers/test.js'),
path.resolve(sourceDir, '../', 'helpers/test.js')
);

config = merge(config, editionConfig);
break;
}
// 4.3
Expand Down

0 comments on commit f04fd26

Please sign in to comment.