@junobuild/config 0.0.14 → 0.0.15
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 +8 -6
- package/dist/types/types/cli.config.d.ts +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -154,12 +154,14 @@ Configures the hosting behavior of the Storage.
|
|
|
154
154
|
|
|
155
155
|
#### :gear: CliConfig
|
|
156
156
|
|
|
157
|
-
| Property
|
|
158
|
-
|
|
|
159
|
-
| `source`
|
|
160
|
-
| `ignore`
|
|
161
|
-
| `gzip`
|
|
162
|
-
| `encoding`
|
|
157
|
+
| Property | Type | Description |
|
|
158
|
+
| ------------ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
159
|
+
| `source` | `string or undefined` | Specifies the directory from which to deploy to Storage.For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`. default: 'build'type: {string} |
|
|
160
|
+
| `ignore` | `string[] or undefined` | Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore. type: {string[]}optional |
|
|
161
|
+
| `gzip` | `string or false or undefined` | Controls the Gzip compression optimization for files in the source folder. By default, it targets JavaScript (js), ES Module (mjs), and CSS (css) files.You can disable this by setting it to `false` or customize it with a different file matching pattern using glob syntax. type: {string | false}optional |
|
|
162
|
+
| `encoding` | `[string, ENCODING_TYPE][] or undefined` | Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:- `.Z` for compress,- `.gz` for gzip,- `.br` for brotli,- `.zlib` for deflate,- anything else defaults to `identity`.The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types. type: {Array<[string, ENCODING_TYPE]>}optional |
|
|
163
|
+
| `predeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run before the deployment process begins.This can be useful for tasks such as compiling assets, running tests, or building production-ready files.Example:`json{ "predeploy": ["npm run build", "npm run lint"]}` type: {string[]}optional |
|
|
164
|
+
| `postdeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run after the deployment process completes.This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.Example:`json{ "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"]}` type: {string[]}optional |
|
|
163
165
|
|
|
164
166
|
#### :gear: JunoConfigEnv
|
|
165
167
|
|
|
@@ -33,4 +33,34 @@ export interface CliConfig {
|
|
|
33
33
|
* @optional
|
|
34
34
|
*/
|
|
35
35
|
encoding?: Array<[string, ENCODING_TYPE]>;
|
|
36
|
+
/**
|
|
37
|
+
* Defines a list of scripts or commands to be run before the deployment process begins.
|
|
38
|
+
* This can be useful for tasks such as compiling assets, running tests, or building production-ready files.
|
|
39
|
+
*
|
|
40
|
+
* Example:
|
|
41
|
+
* ```json
|
|
42
|
+
* {
|
|
43
|
+
* "predeploy": ["npm run build", "npm run lint"]
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @type {string[]}
|
|
48
|
+
* @optional
|
|
49
|
+
*/
|
|
50
|
+
predeploy?: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Defines a list of scripts or commands to be run after the deployment process completes.
|
|
53
|
+
* This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.
|
|
54
|
+
*
|
|
55
|
+
* Example:
|
|
56
|
+
* ```json
|
|
57
|
+
* {
|
|
58
|
+
* "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"]
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @type {string[]}
|
|
63
|
+
* @optional
|
|
64
|
+
*/
|
|
65
|
+
postdeploy?: string[];
|
|
36
66
|
}
|