@ongov/ontario-design-system-component-library-angular 8.1.0-alpha.4 → 9.0.0-alpha.1
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 +6 -6
- package/dist/component-library/fesm2022/angular-component-library.mjs +510 -458
- package/dist/component-library/fesm2022/angular-component-library.mjs.map +1 -1
- package/dist/component-library/package.json +2 -1
- package/dist/component-library/types/angular-component-library.d.ts +24 -6
- package/package.json +22 -22
- package/projects/component-library/src/lib/stencil-generated/components.ts +50 -2
- package/projects/component-library/src/lib/stencil-generated/index.ts +2 -0
package/README.md
CHANGED
|
@@ -96,10 +96,10 @@ If your app serves component assets (fonts, images, favicons) from a non-root pa
|
|
|
96
96
|
```typescript
|
|
97
97
|
import { setAssetPath } from '@ongov/ontario-design-system-component-library-angular';
|
|
98
98
|
|
|
99
|
-
setAssetPath(`${window.location.origin}
|
|
99
|
+
setAssetPath(`${window.location.origin}`);
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
If your app serves component assets (fonts, images, favicons) from a non-root path, configure the asset base path before components render. Pass `window.location.origin` (no `/assets/` suffix) — the library's internal asset helper appends the correct path segment automatically.
|
|
103
103
|
|
|
104
104
|
You can now use the Angular Components in your component template files.
|
|
105
105
|
|
|
@@ -116,16 +116,16 @@ The assets in the npm package are located at `@ongov/ontario-design-system-compo
|
|
|
116
116
|
In a standard Angular application this can be done in a number of ways. One way is to use the [copyfiles](https://www.npmjs.com/package/copyfiles) npm package, which you can with any operating system:
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
copyfiles -E -f "node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets
|
|
119
|
+
copyfiles -E -f "node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets/images/**" src/assets
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
Another way is to add scripts to copy the assets in your `package.json` file. For example:
|
|
123
123
|
|
|
124
124
|
```json
|
|
125
125
|
"prebuild": "npm run copy:assets",
|
|
126
|
-
"copy:images": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/
|
|
127
|
-
"copy:favicons": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/
|
|
128
|
-
"copy:fonts": "copyfiles -E -u 6 \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/
|
|
126
|
+
"copy:images": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets/images/**\" src/assets",
|
|
127
|
+
"copy:favicons": "copyfiles -E -f \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets/favicons/**\" src/assets/favicons",
|
|
128
|
+
"copy:fonts": "copyfiles -E -u 6 \"node_modules/@ongov/ontario-design-system-component-library-angular/dist/assets/fonts/**/*\" src/assets/fonts",
|
|
129
129
|
"copy:assets": "npm run copy:images && npm run copy:favicons && npm run copy:fonts"
|
|
130
130
|
```
|
|
131
131
|
|