Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ program
.requiredOption('--product-url <url>', 'Product page URL.')
.option('-u, --auth-username <user>', 'Basic authentication username.')
.option('-p, --auth-password <password>', 'Basic authentication password.')
.option('-o, --output <path>', 'Output file path.')
.option('-d, --debug', 'Enable logging of debugging information.')
.action((config) => {
if (config.debug) {
Expand Down
4 changes: 3 additions & 1 deletion lib/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ module.exports = async (generationConfig) => {
);
});

let outputPath = generationConfig.output || 'magepack.config.js';

fs.writeFileSync(
path.resolve('magepack.config.js'),
path.resolve(outputPath),
`module.exports = ${stringify(bundles, null, ' ')}`
);
};