@metricinsights/pp-dev 0.3.3 → 0.5.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
@@ -1,6 +1,13 @@
1
1
  # pp-dev
2
2
 
3
- The PP Dev Helper is a development framework and build tool for Metric Insights' Portal Pages, designed to make the lives of PP developers easier:
3
+ <p align="center">
4
+ <a href="https://www.npmjs.com/package/@metricinsights/pp-dev"><img alt="npm" src="https://img.shields.io/npm/v/%40metricinsights%2Fpp-dev?logo=npm&label=npm%20package"></a>
5
+ <a href="https://github.com/mi-examples/pp-dev-js/actions/workflows/publish.yml"><img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/mi-examples/pp-dev-js/publish.yml?logo=github"></a>
6
+ </p>
7
+
8
+ The PP Dev Helper is a development framework and build tool for Metric Insights' Portal Pages, designed to make the
9
+ lives of PP developers easier:
10
+
4
11
  - build your Portal Page
5
12
  - run/test locally with API requests proxied to a Metric Insights server
6
13
  - a lot more (to be documented soon!)
@@ -96,8 +103,6 @@ module.exports = withPPDev({
96
103
  });
97
104
  ```
98
105
 
99
-
100
-
101
106
  ### Vite configuration
102
107
 
103
108
  If you need to change something in the build you can define a `vite.config` file.
@@ -157,13 +162,63 @@ Default: `10 * 60 * 1000`
157
162
 
158
163
  Description: Defines proxy cache TTL in milliseconds
159
164
 
165
+ #### `disableSSLValidation`
166
+
167
+ Type: Boolean
168
+
169
+ Default: `false`
170
+
171
+ Description: Disables SSL certificate validation for proxy requests. Useful for self-signed certificates
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
+
160
215
  ### CLI API description
161
216
 
162
217
  - `pp-dev help` - show CLI's help
163
218
 
164
219
  - `pp-dev` or `pp-dev serve` or `pp-dev dev` runs application in development mode
165
- - `pp-dev build` starts 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
166
-
220
+ - `pp-dev build` starts the application build. Will create `dist` and `dist-zip` folders. `dist` folder contains
221
+ unzipped build files. `dist-zip` contains file `<package-name>.zip` with files from the `dist` folder
167
222
 
168
223
  ## Migration guide from old Portal Page Helper to new
169
224
 
@@ -189,4 +244,3 @@ Description: Defines proxy cache TTL in milliseconds
189
244
  Also, you may need to add `type="module"` to every script that is added by the `script` tag with the `src` property.
190
245
  Actually would be good to have only one `script` tag with the `src` tag.
191
246
  Every other JS file will be imported with construction like this `import helper from './helpers';`
192
-