@forsakringskassan/vite-lib-config 5.13.6 → 5.15.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 +22 -1
- package/dist/api-extractor.mjs +141 -3123
- package/dist/cli.mjs +7 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/vite.config.cjs +285 -3264
- package/dist/vite.config.mjs +283 -3262
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Toolchain for building Vue framework libraries.
|
|
|
5
5
|
- Hybrid ESM/CJS packages.
|
|
6
6
|
- Transpiled with Babel.
|
|
7
7
|
- Supports monorepo.
|
|
8
|
-
- Optional: build pageobjects and
|
|
8
|
+
- Optional: build pageobjects, selectors, and mocks.
|
|
9
9
|
- Optional: shared typescript configuration.
|
|
10
10
|
|
|
11
11
|
## Configuration
|
|
@@ -107,6 +107,27 @@ If `src/selectors/index.ts` it will be built to `dist/${format}/selectors.${cjs,
|
|
|
107
107
|
|
|
108
108
|
If `src/cypress/index.ts` it will be built to `dist/${format}/cypress.${cjs,mjs}`.
|
|
109
109
|
|
|
110
|
+
### Optional: build mocks
|
|
111
|
+
|
|
112
|
+
```diff
|
|
113
|
+
{
|
|
114
|
+
"scripts": {
|
|
115
|
+
"build": "fk-build-vue-lib --mocks",
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This builds `src/mocks/index.ts` to `dist/${format}/mocks.${cjs,mjs}`. The file must export a list of mocks of type [`apimock-express`](https://github.com/Forsakringskassan/apimock-express) (`MockEntry[]` or `Mock[]`).
|
|
121
|
+
|
|
122
|
+
**src/mocks/index.ts**
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import { type Mock } from "@forsakringskassan/apimock-express";
|
|
126
|
+
|
|
127
|
+
const mocks: Mock[] = [...];
|
|
128
|
+
export default mocks;
|
|
129
|
+
```
|
|
130
|
+
|
|
110
131
|
### Dev-server
|
|
111
132
|
|
|
112
133
|
```json
|