@metricinsights/pp-dev 0.4.0 → 0.6.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.
package/README.md CHANGED
@@ -170,13 +170,122 @@ Default: `false`
170
170
 
171
171
  Description: Disables SSL certificate validation for proxy requests. Useful for self-signed certificates
172
172
 
173
+ #### `imageOptimizer`
174
+
175
+ Type: Boolean | Object
176
+
177
+ Default: `true`
178
+
179
+ Description: Enables image optimization for build.
180
+ If you want to disable image optimization, you need to set this option to `false`.
181
+ If you want to customize image optimization, you need to set this option to an object with properties that are described
182
+ in the [vite-plugin-image-optimizer](https://www.npmjs.com/package/vite-plugin-image-optimizer#plugin-options)
183
+
184
+ #### `outDir`
185
+
186
+ Type: String
187
+
188
+ Default: `dist`
189
+
190
+ Description: Define the output directory for the build
191
+
192
+ #### `distZip`
193
+
194
+ Type: Boolean | { outDir?: string, outFileName?: string }
195
+
196
+ Default: `true`
197
+
198
+ Description: Enables zipping the build output.
199
+ If you want to disable zipping the build output, you need to set this option to `false`.
200
+ If you want to customize zipping the build output,
201
+ you need to set this option to an object with properties `outDir` and `outFileName`.
202
+
203
+ - `outDir` defines the output directory for the zipped build.
204
+ - `outFileName` defines the output file name for the zipped build.
205
+ You can use placeholder `[templateName]` in the file name to replace it with the template name.
206
+
207
+ #### `syncBackupsDir`
208
+
209
+ Type: String
210
+
211
+ Default: `backups`
212
+
213
+ Description: Define the directory for the asset backups that are used for backup assets from the MI server
214
+
173
215
  ### CLI API description
174
216
 
175
- - `pp-dev help` - show CLI's help
217
+ `pp-dev help` - show CLI's help
218
+
219
+ Global options:
220
+
221
+ - `-c, --config <configFile>` - define the path to the configuration file. Default is `pp-dev.config.js`
222
+ - `--base <path>` - public base path (default: `/`)
223
+ - `-l, --logLevel <level>` - define the log level. Default is `info`. Available options: `trace`, `debug`, `info`, `warn`, `error`, `silent`
224
+ - `--clearScreen` - clear the screen before logging
225
+ - `--mode <mode>` - define the environment mode. Default is `development`. Available options: `development`, `production`, `test`
226
+
227
+ #### `pp-dev`
228
+
229
+ Aliases: `pp-dev dev`, `pp-dev serve`
230
+
231
+ Runs application in development mode with hot-reload. Also, its proxies requests to the MI server.
232
+
233
+ Available options and arguments:
234
+
235
+ - `[root]` - define the root directory for the application. Default is `.`
236
+ - `--host <host>` - define the host for the application. Default is `localhost`
237
+ - `--port <port>` - define the port for the application. Default is `3000`
238
+ - `--open [path]` - open the application in the default browser. You can define the path to open the browser with the specific page
239
+ - `--strictPort` - enable strict port checking. If the port is already in use, the application will exit with an error
240
+
241
+ #### `pp-dev next`
242
+
243
+ Aliases: `pp-dev next-server`, `pp-dev next-dev`
244
+
245
+ Runs the Next.js application in development mode with hot-reload. Also, its proxies requests to the MI server.
246
+
247
+ Available options and arguments:
248
+
249
+ - `[root]` - define the root directory for the application. Default is `.`
250
+ - `--port <port>` - define the port for the application. Default is `3000`
251
+ - `--host <host>` - define the host for the application. Default is `localhost`
252
+
253
+ #### `pp-dev build`
254
+
255
+ Runs the application build. Will create `dist` and `dist-zip` folders. `dist` folder contains unzipped build files. `dist-zip` contains file `<package-name>.zip` with files from the `dist` folder
256
+
257
+ Available options and arguments:
258
+
259
+ - `[root]` - define the root directory for the application. Default is `.`
260
+ - `--target <target>` - transpile target. Default is `modules`.
261
+ - `--outDir <outDir>` - define the output directory for the build. Default is `dist`
262
+ - `--assetsDir <dir>` - directory under outDir to place assets in Default is `assets`
263
+ - `--changelog [assetsFile]` - create a changelog file. You can define the path to the assets file or set `true` to use the default path. Default is `true`. Default path is `backups/<latest>.zip` where `<latest>` is the latest backup file
264
+
265
+ #### `pp-dev changelog [oldAssetPath] [newAssetPath]`
266
+
267
+ Create a changelog file. You can define the path to the previous and current assets files. If you don't define the path to the previous assets and current assets file, the CLI will try to get it from options. If you don't define the path to the current assets file, the CLI will throw an error.
268
+
269
+ Available options and arguments:
270
+
271
+ - `[oldAssetPath]` - define the path to the current assets file. Can accept path to the folder or path to the zip file
272
+ - `[newAssetPath]` - define the path to the previous assets file. Can accept path to the folder or path to the zip file
273
+ - `--oldAssetsPath <oldAssetsPath>` - define the path to the previous assets file. Can accept path to the folder or path to the zip file
274
+ - `--newAssetsPath <newAssetsPath>` - define the path to the current assets file. Can accept path to the folder or path to the zip file
275
+ - `--destination <destination>` - define the destination path for the changelog file. Default is `.`
276
+ - `--filename <filename>` - define the filename for the changelog file. Default is `CHANGELOG.html`
277
+
278
+ #### `pp-dev generate-icon-font [source] [destination]`
279
+
280
+ Generate an icon font from the source folder. You can define the path to the source folder and the destination folder. If you don't define the path to the source folder, the CLI will try to get it from options. If you don't define the path to the destination folder, the CLI will throw an error.
281
+
282
+ Available options and arguments:
176
283
 
177
- - `pp-dev` or `pp-dev serve` or `pp-dev dev` runs application in development mode
178
- - `pp-dev build` starts the application build. Will create `dist` and `dist-zip` folders. `dist` folder contains
179
- unzipped build files. `dist-zip` contains file `<package-name>.zip` with files from the `dist` folder
284
+ - `[source]` - define the path to the source folder with SVG icons
285
+ - `[destination]` - define the path to the destination folder for the generated icon font and styles
286
+ - `--source <source>` - define the path to the source folder with SVG icons
287
+ - `--destination <destination>` - define the path to the destination folder for the generated icon font and styles
288
+ - `--fontName <fontName>` - define the font name. Default is `icon-font`
180
289
 
181
290
  ## Migration guide from old Portal Page Helper to new
182
291