Skip to content

Commit 199a9bd

Browse files
committed
feat: user definable build filename
1 parent 260a0ff commit 199a9bd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/build.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if (argv.help) {
1919
console.log('Builds the companion module')
2020
console.log(' --dev: Build in development mode. This will not minify the code, making it easier to debug.')
2121
console.log(' --prerelease: Build in prerelease mode. This gets added as metadata to the manifest')
22+
console.log(' --output <filename>: Output to a specific filename, without a file extension')
2223
process.exit(0)
2324
}
2425

@@ -201,9 +202,9 @@ if (Object.keys(packageJson.dependencies).length) {
201202

202203
// Create tgz of the build
203204
let tgzFile = `${manifestJson.name}-${manifestJson.version}`
204-
if(Boolean(argv['l'])) {
205-
// -l flag, legacy behaviour creating pkg.tgz output
206-
tgzFile = 'pkg'
205+
if (typeof argv['output'] === 'string') {
206+
// -o flag, to allow legacy behaviour creating pkg.tgz output
207+
tgzFile = argv['output']
207208
}
208209
tgzFile += '.tgz'
209210
console.log('Writing compressed package output to', tgzFile)

0 commit comments

Comments
 (0)