weg-shared-layout 0.0.46 → 0.0.48
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/dist/cjs/weg-footer_2.cjs.entry.js +7 -7
- package/dist/collection/components/weg-footer/weg-footer.css +28 -19
- package/dist/collection/components/weg-footer/weg-footer.js +4 -4
- package/dist/collection/components/weg-header/weg-header.js +2 -2
- package/dist/collection/types/menus-data.js +1 -0
- package/dist/collection/utils/menus.js +39 -0
- package/dist/components/weg-footer.js +1 -1
- package/dist/components/weg-header.js +1 -1
- package/dist/esm/weg-footer_2.entry.js +7 -7
- package/dist/test-utils/layout-fixtures.js +48 -0
- package/dist/types/Users/rakin/Documents/WEG/repos/weg-shared-layout/.stencil/test-utils/layout-fixtures.d.ts +8 -0
- package/dist/types/types/layout-data.d.ts +2 -1
- package/dist/types/types/menus-data.d.ts +37 -0
- package/dist/types/utils/menus.d.ts +18 -0
- package/dist/weg-shared-layout/p-16f87e9e.entry.js +1 -0
- package/dist/weg-shared-layout/weg-shared-layout.esm.js +1 -1
- package/docs/README.md +54 -51
- package/docs/angular.md +440 -451
- package/docs/nextjs.md +313 -312
- package/docs/publishing.md +65 -65
- package/docs/react.md +291 -287
- package/docs/vanilla.md +159 -155
- package/package.json +93 -81
- package/readme.md +121 -108
- package/src/assets/weg21-bootstrap.json +12 -0
- package/src/assets/weg21-menus.json +19 -0
- package/src/types/menus-data.ts +44 -0
- package/src/utils/menus.ts +65 -0
- package/dist/weg-shared-layout/p-0a8fe6e1.entry.js +0 -1
- package/src/assets/dummy-data.json +0 -221
package/docs/publishing.md
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
# Publishing to npm
|
|
2
|
-
|
|
3
|
-
## `npm publish` does not run your build by default
|
|
4
|
-
|
|
5
|
-
Publishing packs **whatever is already on disk** under the paths listed in [`package.json` `files`](../package.json) (for this package: `dist/`, `loader/`, and `
|
|
6
|
-
|
|
7
|
-
If you publish with an empty, missing, or half-built `dist/`, consumers get a broken tarball (missing `loader/index.js`, missing `dist/components/*.js`, missing type declarations, etc.).
|
|
8
|
-
|
|
9
|
-
## What this repo does
|
|
10
|
-
|
|
11
|
-
The **`prepack`** script runs **`npm run build`** before every:
|
|
12
|
-
|
|
13
|
-
- `npm pack`
|
|
14
|
-
- `npm publish` (which packs first)
|
|
15
|
-
|
|
16
|
-
So the Stencil output and generated `loader/` are always fresh in the tarball.
|
|
17
|
-
|
|
18
|
-
```json
|
|
19
|
-
"scripts": {
|
|
20
|
-
"prepack": "npm run build",
|
|
21
|
-
"build": "stencil build"
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Release checklist
|
|
26
|
-
|
|
27
|
-
1. Bump **`version`** in `package.json`.
|
|
28
|
-
2. From the package root:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm run build
|
|
32
|
-
npm test
|
|
33
|
-
npm pack --dry-run
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Inspect the dry-run file list and spot-check for:
|
|
37
|
-
|
|
38
|
-
- `loader/index.js`, `loader/index.d.ts`
|
|
39
|
-
- `dist/components/weg-header.js`, `dist/components/weg-footer.js`
|
|
40
|
-
- `src/assets/
|
|
41
|
-
- `dist/types/types/layout-data.d.ts` (via `exports["./layout-data"]`)
|
|
42
|
-
|
|
43
|
-
3. Smoke-test the Angular 16 demo (optional but recommended):
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm run demo:angular16:build
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
See [demo/angular16/README.md](../demo/angular16/README.md).
|
|
50
|
-
|
|
51
|
-
4. Publish (runs `prepack` → build again):
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npm publish
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Use `npm publish --dry-run` if you want to exercise the full pack pipeline without uploading.
|
|
58
|
-
|
|
59
|
-
## What consumers import
|
|
60
|
-
|
|
61
|
-
Documented in [docs/README.md](./README.md): `loader`, `
|
|
62
|
-
|
|
63
|
-
## CI
|
|
64
|
-
|
|
65
|
-
If you publish from CI, run **`npm run build`** (or rely on **`npm publish`**, which triggers **`prepack`**) in the same job before `npm publish`, and ensure **devDependencies** (e.g. `@stencil/core`) are installed so `stencil build` succeeds.
|
|
1
|
+
# Publishing to npm
|
|
2
|
+
|
|
3
|
+
## `npm publish` does not run your build by default
|
|
4
|
+
|
|
5
|
+
Publishing packs **whatever is already on disk** under the paths listed in [`package.json` `files`](../package.json) (for this package: `dist/`, `loader/`, and `weg21-bootstrap.json` and `weg21-menus.json`). It does **not** automatically run `npm run build` unless a lifecycle script does.
|
|
6
|
+
|
|
7
|
+
If you publish with an empty, missing, or half-built `dist/`, consumers get a broken tarball (missing `loader/index.js`, missing `dist/components/*.js`, missing type declarations, etc.).
|
|
8
|
+
|
|
9
|
+
## What this repo does
|
|
10
|
+
|
|
11
|
+
The **`prepack`** script runs **`npm run build`** before every:
|
|
12
|
+
|
|
13
|
+
- `npm pack`
|
|
14
|
+
- `npm publish` (which packs first)
|
|
15
|
+
|
|
16
|
+
So the Stencil output and generated `loader/` are always fresh in the tarball.
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prepack": "npm run build",
|
|
21
|
+
"build": "stencil build"
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Release checklist
|
|
26
|
+
|
|
27
|
+
1. Bump **`version`** in `package.json`.
|
|
28
|
+
2. From the package root:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm run build
|
|
32
|
+
npm test
|
|
33
|
+
npm pack --dry-run
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Inspect the dry-run file list and spot-check for:
|
|
37
|
+
|
|
38
|
+
- `loader/index.js`, `loader/index.d.ts`
|
|
39
|
+
- `dist/components/weg-header.js`, `dist/components/weg-footer.js`
|
|
40
|
+
- `src/assets/weg21-bootstrap.json`, `src/assets/weg21-menus.json` (via package `exports`)
|
|
41
|
+
- `dist/types/types/layout-data.d.ts` (via `exports["./layout-data"]`)
|
|
42
|
+
|
|
43
|
+
3. Smoke-test the Angular 16 demo (optional but recommended):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run demo:angular16:build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
See [demo/angular16/README.md](../demo/angular16/README.md).
|
|
50
|
+
|
|
51
|
+
4. Publish (runs `prepack` → build again):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm publish
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `npm publish --dry-run` if you want to exercise the full pack pipeline without uploading.
|
|
58
|
+
|
|
59
|
+
## What consumers import
|
|
60
|
+
|
|
61
|
+
Documented in [docs/README.md](./README.md): `loader`, `menus`, `menus-data`, `layout-data`, `weg21-bootstrap.json`, `weg21-menus.json`, and per-tag subpaths. Angular 16 apps need modern `moduleResolution` or the loader-only pattern — [angular.md](./angular.md).
|
|
62
|
+
|
|
63
|
+
## CI
|
|
64
|
+
|
|
65
|
+
If you publish from CI, run **`npm run build`** (or rely on **`npm publish`**, which triggers **`prepack`**) in the same job before `npm publish`, and ensure **devDependencies** (e.g. `@stencil/core`) are installed so `stencil build` succeeds.
|