@travetto/pack 3.1.3 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -44
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -29,18 +29,19 @@ $ trv pack --help
|
|
|
29
29
|
Usage: pack [options]
|
|
30
30
|
|
|
31
31
|
Options:
|
|
32
|
-
-w, --workspace <string>
|
|
33
|
-
--clean, --no-clean
|
|
34
|
-
-o, --output <string>
|
|
35
|
-
--main-scripts, --no-main-scripts
|
|
36
|
-
-f, --main-name <string>
|
|
37
|
-
-e, --entry-point <string>
|
|
38
|
-
--minify, --no-minify
|
|
39
|
-
-sm, --sourcemap
|
|
40
|
-
-is, --include-sources
|
|
41
|
-
-x, --eject-file <string>
|
|
42
|
-
-
|
|
43
|
-
-
|
|
32
|
+
-w, --workspace <string> Workspace for building (default: "/tmp/<temp-folder>")
|
|
33
|
+
--clean, --no-clean Clean workspace (default: true)
|
|
34
|
+
-o, --output <string> Output location
|
|
35
|
+
--main-scripts, --no-main-scripts Create entry scripts (default: true)
|
|
36
|
+
-f, --main-name <string> Main name for build artifact
|
|
37
|
+
-e, --entry-point <string> Entry point (default: "@travetto/cli/support/entry.cli")
|
|
38
|
+
--minify, --no-minify Minify output (default: true)
|
|
39
|
+
-sm, --sourcemap Bundle source maps (default: false)
|
|
40
|
+
-is, --include-sources Include source with source maps (default: false)
|
|
41
|
+
-x, --eject-file <string> Eject commands to file
|
|
42
|
+
-r, --rollup-configuration <string> Rollup configuration file (default: "@travetto/pack/support/bin/rollup")
|
|
43
|
+
-m, --module <string> Module to run for
|
|
44
|
+
-h, --help display help for command
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
This command line operation will compile your project, and produce a ready to use workspace as a deliverable. Additionally, you can pass in a file to the `eject-file` flag that will allow for a script to be produced (base on the host operating system).
|
|
@@ -90,18 +91,19 @@ $ trv pack:zip --help
|
|
|
90
91
|
Usage: pack:zip [options]
|
|
91
92
|
|
|
92
93
|
Options:
|
|
93
|
-
-w, --workspace <string>
|
|
94
|
-
--clean, --no-clean
|
|
95
|
-
-o, --output <string>
|
|
96
|
-
--main-scripts, --no-main-scripts
|
|
97
|
-
-f, --main-name <string>
|
|
98
|
-
-e, --entry-point <string>
|
|
99
|
-
--minify, --no-minify
|
|
100
|
-
-sm, --sourcemap
|
|
101
|
-
-is, --include-sources
|
|
102
|
-
-x, --eject-file <string>
|
|
103
|
-
-
|
|
104
|
-
-
|
|
94
|
+
-w, --workspace <string> Workspace for building (default: "/tmp/<temp-folder>")
|
|
95
|
+
--clean, --no-clean Clean workspace (default: true)
|
|
96
|
+
-o, --output <string> Output location (default: "travetto_pack.zip")
|
|
97
|
+
--main-scripts, --no-main-scripts Create entry scripts (default: true)
|
|
98
|
+
-f, --main-name <string> Main name for build artifact
|
|
99
|
+
-e, --entry-point <string> Entry point (default: "@travetto/cli/support/entry.cli")
|
|
100
|
+
--minify, --no-minify Minify output (default: true)
|
|
101
|
+
-sm, --sourcemap Bundle source maps (default: false)
|
|
102
|
+
-is, --include-sources Include source with source maps (default: false)
|
|
103
|
+
-x, --eject-file <string> Eject commands to file
|
|
104
|
+
-r, --rollup-configuration <string> Rollup configuration file (default: "@travetto/pack/support/bin/rollup")
|
|
105
|
+
-m, --module <string> Module to run for
|
|
106
|
+
-h, --help display help for command
|
|
105
107
|
```
|
|
106
108
|
|
|
107
109
|
## CLI - pack:docker
|
|
@@ -114,25 +116,26 @@ $ trv pack:docker --help
|
|
|
114
116
|
Usage: pack:docker [options]
|
|
115
117
|
|
|
116
118
|
Options:
|
|
117
|
-
-w, --workspace <string>
|
|
118
|
-
--clean, --no-clean
|
|
119
|
-
-o, --output <string>
|
|
120
|
-
--main-scripts, --no-main-scripts
|
|
121
|
-
-f, --main-name <string>
|
|
122
|
-
-e, --entry-point <string>
|
|
123
|
-
--minify, --no-minify
|
|
124
|
-
-sm, --sourcemap
|
|
125
|
-
-is, --include-sources
|
|
126
|
-
-x, --eject-file <string>
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
119
|
+
-w, --workspace <string> Workspace for building (default: "/tmp/<temp-folder>")
|
|
120
|
+
--clean, --no-clean Clean workspace (default: true)
|
|
121
|
+
-o, --output <string> Output location
|
|
122
|
+
--main-scripts, --no-main-scripts Create entry scripts (default: true)
|
|
123
|
+
-f, --main-name <string> Main name for build artifact
|
|
124
|
+
-e, --entry-point <string> Entry point (default: "@travetto/cli/support/entry.cli")
|
|
125
|
+
--minify, --no-minify Minify output (default: true)
|
|
126
|
+
-sm, --sourcemap Bundle source maps (default: false)
|
|
127
|
+
-is, --include-sources Include source with source maps (default: false)
|
|
128
|
+
-x, --eject-file <string> Eject commands to file
|
|
129
|
+
-r, --rollup-configuration <string> Rollup configuration file (default: "@travetto/pack/support/bin/rollup")
|
|
130
|
+
-df, --docker-factory <string> Docker Factory source (default: "@travetto/pack/support/pack.dockerfile")
|
|
131
|
+
-di, --docker-image <string> Docker Image to extend (default: "node:18-alpine3.16")
|
|
132
|
+
-dn, --docker-name <string> Docker Image Name (default: "travetto_pack")
|
|
133
|
+
-dt, --docker-tag <string> Docker Image Tag (default: ["latest"])
|
|
134
|
+
-dp, --docker-port <number> Docker Image Port (default: [])
|
|
135
|
+
-dx, --docker-push Docker Push Tags (default: false)
|
|
136
|
+
-dr, --docker-registry <string> Docker Registry
|
|
137
|
+
-m, --module <string> Module to run for
|
|
138
|
+
-h, --help display help for command
|
|
136
139
|
```
|
|
137
140
|
|
|
138
141
|
The additional flags provided are allow for specifying the base image, the final docker image name (and tags), and which registry to push to (if any). Additionally, there are flags for exposing which ports the image should expect to open as well. When using the `--eject-file` flag, the output script will produce the entire Dockerfile output inline, so that it can be easily modified as needed.
|
|
@@ -220,7 +223,7 @@ export BUNDLE_OUTPUT=$DIST
|
|
|
220
223
|
export BUNDLE_FORMAT=commonjs
|
|
221
224
|
export TRV_MANIFEST=$TRV_OUT/node_modules/$MOD
|
|
222
225
|
cd $TRV_OUT
|
|
223
|
-
npx rollup -c node_modules/@travetto/pack/support/bin/rollup.js
|
|
226
|
+
npx rollup -c $TRV_OUT/node_modules/@travetto/pack/support/bin/rollup.js
|
|
224
227
|
cd $ROOT
|
|
225
228
|
|
|
226
229
|
# Generating Docker File $DIST/Dockerfile @travetto/pack/support/pack.dockerfile
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/pack",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Code packing utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"travetto",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"directory": "module/pack"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@rollup/plugin-commonjs": "^24.0
|
|
27
|
+
"@rollup/plugin-commonjs": "^24.1.0",
|
|
28
28
|
"@rollup/plugin-json": "^6.0.0",
|
|
29
|
-
"@rollup/plugin-node-resolve": "^15.0.
|
|
30
|
-
"@rollup/plugin-terser": "^0.4.
|
|
29
|
+
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
30
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
31
31
|
"@travetto/base": "^3.1.1",
|
|
32
|
-
"rollup": "^3.
|
|
32
|
+
"rollup": "^3.22.0",
|
|
33
33
|
"rollup-plugin-sourcemaps": "^0.6.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@travetto/cli": "^3.1.
|
|
36
|
+
"@travetto/cli": "^3.1.5"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@travetto/cli": {
|