@forsakringskassan/vue-lib-template 1.9.30 → 1.9.31
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/files/README.md +57 -29
- package/files/package.json +3 -3
- package/index.js +1 -1
- package/package.json +1 -1
package/files/README.md
CHANGED
|
@@ -1,46 +1,74 @@
|
|
|
1
1
|
# @forsakringskassan/vue-lib-template
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A standardized template for Vue component libraries, with built-in support for updates.
|
|
4
|
+
You are not left on your own after the first scaffold: the template keeps evolving, and your library can follow along.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## Why use this template?
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Setting up a component library means choosing and configuring a bundler, test tools, linters, documentation and a release process, and making them work together.
|
|
9
|
+
The template has already done this, so you can focus on your components.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Libraries based on it stay up to date, with the same standards, the same structure and the same goodness.
|
|
12
|
+
|
|
13
|
+
- **Quick start.**
|
|
14
|
+
A working library with a single command.
|
|
15
|
+
- **Toolchain included.**
|
|
16
|
+
No need to pick packages, match versions or write the configuration that ties them together.
|
|
17
|
+
- **No expertise required.**
|
|
18
|
+
Deliver Vue components without deep toolchain knowledge.
|
|
19
|
+
- **Easy to revive.**
|
|
20
|
+
A library catches up with a single update.
|
|
21
|
+
- **Consistent.**
|
|
22
|
+
Many libraries can share the same standards and structure.
|
|
23
|
+
- **Reference included.**
|
|
24
|
+
An example component shows the recommended way to build, test and document a component.
|
|
25
|
+
|
|
26
|
+
## Getting started
|
|
27
|
+
|
|
28
|
+
Projects are created with [Cloneman](https://github.com/Forsakringskassan/cloneman), which creates a project from a template and later helps you update it.
|
|
29
|
+
Run:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx cloneman@latest create my-component-library @forsakringskassan/vue-lib-template
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Cloneman asks for the values the template needs, such as the URL to your code repository (or pass them with `--param key=value`).
|
|
36
|
+
Then install the dependencies and build:
|
|
10
37
|
|
|
11
38
|
```bash
|
|
39
|
+
cd my-component-library
|
|
40
|
+
npm install
|
|
12
41
|
npm run build
|
|
13
|
-
npm run start:docs
|
|
14
42
|
```
|
|
15
43
|
|
|
16
|
-
|
|
44
|
+
The generated project contains its own [README](./project-guide/index.md) with instructions for daily development, testing, documentation and releases.
|
|
17
45
|
|
|
18
|
-
|
|
19
|
-
Varje komponent ska ha en tillhörande Markdown fil (`.md`) med ett inledande Frontmatter-block:
|
|
46
|
+
## What you get
|
|
20
47
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
```
|
|
48
|
+
- Vue 3 component library built with [Vite](https://vite.dev/) and TypeScript, based on FKUI.
|
|
49
|
+
- Unit tests with [Vitest](https://vitest.dev/) and component tests with [Cypress](https://www.cypress.io/).
|
|
50
|
+
- Linting and formatting with ESLint, Stylelint, HTML-Validate and Prettier.
|
|
51
|
+
- Public API tracking with API Extractor.
|
|
52
|
+
- Documentation site with live examples, generated with [docs-generator](https://github.com/Forsakringskassan/docs-generator).
|
|
53
|
+
- Automated versioning, changelog and publishing with semantic-release.
|
|
54
|
+
- Renovate configuration for automated dependency updates.
|
|
29
55
|
|
|
30
|
-
|
|
56
|
+
## Keeping up to date with Cloneman
|
|
31
57
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
${filename}
|
|
35
|
-
```
|
|
36
|
-
````
|
|
58
|
+
The template is published as an npm package, and your project is tied to a specific version of it.
|
|
59
|
+
When a new version is released, you bring your project up to date with a single command.
|
|
37
60
|
|
|
38
|
-
|
|
61
|
+
1. Run `npx cloneman@latest update` (or `update 1.2.3` for a specific version).
|
|
62
|
+
2. Run `npm install`.
|
|
63
|
+
3. Review the diff, run the tests and commit.
|
|
39
64
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
65
|
+
An update is applied as ordinary changes to your working tree, so you always get a diff to review before committing.
|
|
66
|
+
You decide what to take in and what to leave out.
|
|
67
|
+
|
|
68
|
+
### Updating with Renovate
|
|
69
|
+
|
|
70
|
+
With [Renovate](https://docs.renovatebot.com/) you get a pull request when a new template version is released.
|
|
71
|
+
|
|
72
|
+
## License
|
|
45
73
|
|
|
46
|
-
|
|
74
|
+
See [LICENSE.md](./LICENSE.md).
|
package/files/package.json
CHANGED
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"@forsakringskassan/cypress-visual-regression": "5.2.0",
|
|
110
110
|
"@forsakringskassan/docs-generator": "3.22.2",
|
|
111
111
|
"@forsakringskassan/docs-live-example": "3.0.3",
|
|
112
|
-
"@forsakringskassan/eslint-config": "15.
|
|
112
|
+
"@forsakringskassan/eslint-config": "15.13.0",
|
|
113
113
|
"@forsakringskassan/eslint-config-cli": "15.12.0",
|
|
114
|
-
"@forsakringskassan/eslint-config-cypress": "15.
|
|
114
|
+
"@forsakringskassan/eslint-config-cypress": "15.13.0",
|
|
115
115
|
"@forsakringskassan/eslint-config-jest": "15.12.2",
|
|
116
116
|
"@forsakringskassan/eslint-config-typescript": "15.12.6",
|
|
117
117
|
"@forsakringskassan/eslint-config-typescript-typeinfo": "15.12.6",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"@forsakringskassan/stylelint-config": "3.5.1",
|
|
122
122
|
"@forsakringskassan/vite-lib-config": "5.13.4",
|
|
123
123
|
"@forsakringskassan/vitest-config-jsdom": "5.0.1",
|
|
124
|
-
"@forsakringskassan/vue-lib-template": "1.9.
|
|
124
|
+
"@forsakringskassan/vue-lib-template": "1.9.31",
|
|
125
125
|
"@html-validate/release-scripts": "7.6.17",
|
|
126
126
|
"@types/node": "24.19.2",
|
|
127
127
|
"@typescript/native": "npm:typescript@7.0.2",
|
package/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const options = {
|
|
9
9
|
...packageJson.cloneman,
|
|
10
|
-
fileHash: "
|
|
10
|
+
fileHash: "5b681c68c370e12598e6dc852e3900c8d868fe0d477363c52ff5fc2ef74a4b0c",
|
|
11
11
|
apiVersion: 0,
|
|
12
12
|
clonemanVersion: "1.28.0",
|
|
13
13
|
filesDir: path.join(import.meta.dirname, "files"),
|