Skip to content

Commit

Permalink
#9 implement deployment flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jwanner83 committed May 22, 2023
1 parent 6d5824e commit c08681c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundler/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "liferay-npm-bundler-improved",
"description": "A non-official but ultrafast drop-in replacement for the liferay-npm-bundler",
"version": "1.5.0-beta.1",
"version": "1.5.0-beta.2",
"author": "Jonas Wanner",
"license": "ISC",
"repository": {
Expand Down
10 changes: 9 additions & 1 deletion bundler/src/handler/SettingsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import npmbundlerrc from '../types/npmbundlerrc.types'
export default class SettingsHandler {
public watch = false
public port = 3002
public deployment = false
public deploymentPath: string = undefined
public createJar = false
public copyAssets = false
Expand All @@ -15,6 +16,8 @@ export default class SettingsHandler {
'-w': '--watch',
'--port': Number,
'-p': '--port',
'--deploy': Boolean,
'-d': '--deploy',
'--copy-sources': Boolean,
'-cs': '--copy-sources',
'--copy-assets': Boolean,
Expand All @@ -32,11 +35,16 @@ export default class SettingsHandler {
if (args['--copy-sources']) {
this.copySources = true
}

if (args['--copy-assets']) {
this.copyAssets = true
}

if (process.env.LIFERAY_DEPLOYMENT_PATH) {
if (args['--deploy']) {
this.deployment = true
}

if (this.deployment && process.env.LIFERAY_DEPLOYMENT_PATH) {
this.deploymentPath = process.env.LIFERAY_DEPLOYMENT_PATH
}
}
Expand Down

0 comments on commit c08681c

Please sign in to comment.