@travetto/pack 3.0.1-rc.2 → 3.0.2-rc.0

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.
Files changed (2) hide show
  1. package/README.md +48 -27
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -29,16 +29,15 @@ $ trv pack --help
29
29
  Usage: pack [options] [args...]
30
30
 
31
31
  Options:
32
- -w, --workspace <workspace> Workspace for building
33
- -c, --no-clean Disables: Clean workspace
34
- -o, --output <output> Output Location
35
- -e, --entry-point <entry-point> Entry point (default: "node_modules/@travetto/cli/support/cli.js")
36
- -ec, --entry-command <entry-command> Entry command
37
- -m, --no-minify Disables: Minify output
38
- -sm, --sourcemap Bundle source maps
39
- -is, --include-sources Include source with source maps
40
- -x, --eject-file <eject-file> Eject commands to file
41
- -h, --help display help for command
32
+ -w, --workspace <workspace> Workspace for building
33
+ -c, --no-clean Disables: Clean workspace
34
+ -o, --output <output> Output Location
35
+ -e, --entry-point <entry-point> Entry point (default: "@travetto/cli/support/entry.cli")
36
+ -m, --no-minify Disables: Minify output
37
+ -sm, --sourcemap Bundle source maps
38
+ -is, --include-sources Include source with source maps
39
+ -x, --eject-file <eject-file> Eject commands to file
40
+ -h, --help display help for command
42
41
  ```
43
42
 
44
43
  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,16 +89,15 @@ $ trv pack:zip --help
90
89
  Usage: pack:zip [options] [args...]
91
90
 
92
91
  Options:
93
- -w, --workspace <workspace> Workspace for building
94
- -c, --no-clean Disables: Clean workspace
95
- -o, --output <output> Output Location (default: "travetto_pack.zip")
96
- -e, --entry-point <entry-point> Entry point (default: "node_modules/@travetto/cli/support/cli.js")
97
- -ec, --entry-command <entry-command> Entry command
98
- -m, --no-minify Disables: Minify output
99
- -sm, --sourcemap Bundle source maps
100
- -is, --include-sources Include source with source maps
101
- -x, --eject-file <eject-file> Eject commands to file
102
- -h, --help display help for command
92
+ -w, --workspace <workspace> Workspace for building
93
+ -c, --no-clean Disables: Clean workspace
94
+ -o, --output <output> Output Location (default: "travetto_pack.zip")
95
+ -e, --entry-point <entry-point> Entry point (default: "@travetto/cli/support/entry.cli")
96
+ -m, --no-minify Disables: Minify output
97
+ -sm, --sourcemap Bundle source maps
98
+ -is, --include-sources Include source with source maps
99
+ -x, --eject-file <eject-file> Eject commands to file
100
+ -h, --help display help for command
103
101
  ```
104
102
 
105
103
  ## CLI - pack:docker
@@ -116,8 +114,7 @@ Options:
116
114
  -w, --workspace <workspace> Workspace for building
117
115
  -c, --no-clean Disables: Clean workspace
118
116
  -o, --output <output> Output Location
119
- -e, --entry-point <entry-point> Entry point (default: "node_modules/@travetto/cli/support/cli.js")
120
- -ec, --entry-command <entry-command> Entry command
117
+ -e, --entry-point <entry-point> Entry point (default: "@travetto/cli/support/entry.cli")
121
118
  -m, --no-minify Disables: Minify output
122
119
  -sm, --sourcemap Bundle source maps
123
120
  -is, --include-sources Include source with source maps
@@ -157,34 +154,46 @@ export MOD=@travetto/todo-app
157
154
 
158
155
  # Cleaning Output $DIST
159
156
 
157
+ echo "Cleaning Output $DIST
158
+ "
160
159
  rm -rf $DIST
161
160
  mkdir -p $DIST
162
161
 
163
162
  # Writing .env.js
164
163
 
164
+ echo "Writing .env.js
165
+ "
165
166
  echo "process.env.TRV_MANIFEST = 'node_modules/$MOD';" > $DIST/.env.js
166
167
  echo "process.env.TRV_CLI_IPC = '';" >> $DIST/.env.js
167
168
 
168
169
  # Writing package.json
169
170
 
171
+ echo "Writing package.json
172
+ "
170
173
  echo "{\"type\":\"commonjs\"}" > $DIST/package.json
171
174
 
172
175
  # Writing entry scripts cli.sh args=(run rest)
173
176
 
177
+ echo "Writing entry scripts cli.sh args=(run rest)
178
+ "
174
179
  echo "#!/bin/sh" > $DIST/cli.sh
175
180
  echo "cd \$(dirname \"\$0\")" >> $DIST/cli.sh
176
- echo "node cli run rest \$@" >> $DIST/cli.sh
181
+ echo "node cli.js run rest \$@" >> $DIST/cli.sh
177
182
  chmod 755 $DIST/cli.sh
178
183
 
179
184
  # Writing entry scripts cli.cmd args=(run rest)
180
185
 
186
+ echo "Writing entry scripts cli.cmd args=(run rest)
187
+ "
181
188
  echo "" > $DIST/cli.cmd
182
189
  echo "cd %~p0" >> $DIST/cli.cmd
183
- echo "node cli run rest %*" >> $DIST/cli.cmd
190
+ echo "node cli.js run rest %*" >> $DIST/cli.cmd
184
191
  chmod 755 $DIST/cli.cmd
185
192
 
186
193
  # Copying over resources
187
194
 
195
+ echo "Copying over resources
196
+ "
188
197
  mkdir -p $DIST/node_modules/$MOD
189
198
  cp $TRV_OUT/node_modules/$MOD/package.json $DIST/node_modules/$MOD/package.json
190
199
  mkdir -p $DIST/node_modules/@travetto/manifest
@@ -193,17 +202,23 @@ cp -r -p $ROOT/resources $DIST/resources
193
202
 
194
203
  # Generating App Cache node_modules/$MOD/trv-app-cache.json
195
204
 
205
+ echo "Generating App Cache node_modules/$MOD/trv-app-cache.json
206
+ "
196
207
  mkdir -p $DIST/node_modules/$MOD
197
208
  DEBUG=0 TRV_MODULE=$MOD npx trv main @travetto/app/support/bin/list > $DIST/node_modules/$MOD/trv-app-cache.json
198
209
 
199
210
  # Writing Manifest node_modules/$MOD
200
211
 
212
+ echo "Writing Manifest node_modules/$MOD
213
+ "
201
214
  TRV_MODULE=$MOD npx trv manifest $DIST/node_modules/$MOD prod
202
215
 
203
- # Bundling Output minify=true sourcemap= entryPoint=node_modules/@travetto/cli/support/cli.js
216
+ # Bundling Output minify=true sourcemap= entryPoint=@travetto/cli/support/entry.cli
204
217
 
205
- export BUNDLE_ENTRY=node_modules/@travetto/cli/support/cli.js
206
- export BUNDLE_ENTRY_NAME=cli
218
+ echo "Bundling Output minify=true sourcemap= entryPoint=@travetto/cli/support/entry.cli
219
+ "
220
+ export BUNDLE_ENTRY=node_modules/@travetto/cli/support/entry.cli.js
221
+ export BUNDLE_ENTRY_COMMAND=cli
207
222
  export BUNDLE_COMPRESS=true
208
223
  export BUNDLE_OUTPUT=$DIST
209
224
  export BUNDLE_FORMAT=commonjs
@@ -214,6 +229,8 @@ cd $ROOT
214
229
 
215
230
  # Generating Docker File $DIST/Dockerfile @travetto/pack/support/pack.dockerfile
216
231
 
232
+ echo "Generating Docker File $DIST/Dockerfile @travetto/pack/support/pack.dockerfile
233
+ "
217
234
  echo "FROM node:18-alpine3.16" > $DIST/Dockerfile
218
235
  echo "WORKDIR /app" >> $DIST/Dockerfile
219
236
  echo "COPY . ." >> $DIST/Dockerfile
@@ -222,10 +239,14 @@ echo "ENTRYPOINT [\"/app/cli.sh\"]" >> $DIST/Dockerfile
222
239
 
223
240
  # Pulling Docker Base Image node:18-alpine3.16
224
241
 
242
+ echo "Pulling Docker Base Image node:18-alpine3.16
243
+ "
225
244
  docker pull node:18-alpine3.16
226
245
 
227
246
  # Building Docker Container latest
228
247
 
248
+ echo "Building Docker Container latest
249
+ "
229
250
  cd $DIST
230
251
  docker build -t travetto_todo-app:latest .
231
252
  cd $ROOT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/pack",
3
- "version": "3.0.1-rc.2",
3
+ "version": "3.0.2-rc.0",
4
4
  "description": "Code packing utilities",
5
5
  "keywords": [
6
6
  "travetto",
@@ -28,12 +28,12 @@
28
28
  "@rollup/plugin-json": "^6.0.0",
29
29
  "@rollup/plugin-node-resolve": "^15.0.1",
30
30
  "@rollup/plugin-terser": "^0.4.0",
31
- "@travetto/base": "^3.0.1-rc.1",
31
+ "@travetto/base": "^3.0.2-rc.0",
32
32
  "rollup": "^3.17.2",
33
33
  "rollup-plugin-sourcemaps": "^0.6.3"
34
34
  },
35
35
  "peerDependencies": {
36
- "@travetto/cli": "^3.0.1-rc.1"
36
+ "@travetto/cli": "^3.0.2-rc.0"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "@travetto/cli": {