@justeattakeaway/pie-webc 0.0.0-snapshot-release-20240501160411 → 0.0.0-snapshot-release-20240502093622
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 +11 -1
- package/add-components.js +5 -1
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -53,4 +53,14 @@ For full information on using PIE components as part of an application, check ou
|
|
|
53
53
|
|
|
54
54
|
## Contributing
|
|
55
55
|
|
|
56
|
-
Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development) and how to run specific [component tests](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#testing).
|
|
56
|
+
Check out our [contributing guide](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide) for more information on [local development](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#local-development) and how to run specific [component tests](https://github.com/justeattakeaway/pie/wiki/Contributing-Guide#testing).
|
|
57
|
+
|
|
58
|
+
## How it works
|
|
59
|
+
There is a command that can be run to add all pie components to this package. The command is:
|
|
60
|
+
|
|
61
|
+
```npx add-components```
|
|
62
|
+
|
|
63
|
+
When run, a script will find each pie component and create `js` and `d.ts` files them in both `components` and `react` directories. The script will also update the `exports` field in the `package.json` file to include the new components and add the latest version of each component to the `dependencies` field.
|
|
64
|
+
|
|
65
|
+
Generally, there should be no need to run this script. The only time it should be run is when we generated a new component using the component generator. The generator will take care of running this script automatically, so it should be a rare occurrence that it needs to be run manually.
|
|
66
|
+
|
package/add-components.js
CHANGED
|
@@ -71,6 +71,10 @@ fs.readdirSync(componentsSourceDir).forEach((folder) => {
|
|
|
71
71
|
fs.writeFileSync(jsFilePath, fileContent);
|
|
72
72
|
fs.writeFileSync(tsFilePath, fileContent);
|
|
73
73
|
|
|
74
|
+
if (!pieWebcPackageJson.exports) {
|
|
75
|
+
pieWebcPackageJson.exports = {};
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
// Update exports in the pie-webc package.json to include the component
|
|
75
79
|
pieWebcPackageJson.exports[`./${target.type}/${componentName}.js`] = {
|
|
76
80
|
import: `./${target.type}/${componentName}.js`,
|
|
@@ -83,4 +87,4 @@ fs.readdirSync(componentsSourceDir).forEach((folder) => {
|
|
|
83
87
|
|
|
84
88
|
// Write updates back to the package.json
|
|
85
89
|
fs.writeFileSync(pieWebcPackageJsonPath, `${JSON.stringify(pieWebcPackageJson, null, 2)}\n`);
|
|
86
|
-
console.
|
|
90
|
+
console.info('All components added to pie-webc');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-webc",
|
|
3
3
|
"description": "Component bundle containing all PIE web components",
|
|
4
|
-
"version": "0.0.0-snapshot-release-
|
|
4
|
+
"version": "0.0.0-snapshot-release-20240502093622",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"**/*.js",
|
|
@@ -186,22 +186,22 @@
|
|
|
186
186
|
"@justeattakeaway/pie-components-config": "0.16.0"
|
|
187
187
|
},
|
|
188
188
|
"dependencies": {
|
|
189
|
-
"@justeattakeaway/pie-assistive-text": "0.3.
|
|
190
|
-
"@justeattakeaway/pie-button": "0.47.
|
|
191
|
-
"@justeattakeaway/pie-card": "0.19.
|
|
192
|
-
"@justeattakeaway/pie-checkbox": "0.
|
|
193
|
-
"@justeattakeaway/pie-chip": "0.6.
|
|
194
|
-
"@justeattakeaway/pie-cookie-banner": "0.19.
|
|
195
|
-
"@justeattakeaway/pie-divider": "0.13.
|
|
196
|
-
"@justeattakeaway/pie-form-label": "0.13.
|
|
197
|
-
"@justeattakeaway/pie-icon-button": "0.28.
|
|
198
|
-
"@justeattakeaway/pie-input": "0.18.
|
|
199
|
-
"@justeattakeaway/pie-link": "0.17.
|
|
200
|
-
"@justeattakeaway/pie-modal": "0.42.
|
|
201
|
-
"@justeattakeaway/pie-notification": "0.5.
|
|
202
|
-
"@justeattakeaway/pie-spinner": "0.6.
|
|
203
|
-
"@justeattakeaway/pie-switch": "0.29.
|
|
204
|
-
"@justeattakeaway/pie-tag": "0.9.
|
|
189
|
+
"@justeattakeaway/pie-assistive-text": "0.3.6",
|
|
190
|
+
"@justeattakeaway/pie-button": "0.47.4",
|
|
191
|
+
"@justeattakeaway/pie-card": "0.19.4",
|
|
192
|
+
"@justeattakeaway/pie-checkbox": "0.1.0",
|
|
193
|
+
"@justeattakeaway/pie-chip": "0.6.2",
|
|
194
|
+
"@justeattakeaway/pie-cookie-banner": "0.19.6",
|
|
195
|
+
"@justeattakeaway/pie-divider": "0.13.4",
|
|
196
|
+
"@justeattakeaway/pie-form-label": "0.13.4",
|
|
197
|
+
"@justeattakeaway/pie-icon-button": "0.28.5",
|
|
198
|
+
"@justeattakeaway/pie-input": "0.18.2",
|
|
199
|
+
"@justeattakeaway/pie-link": "0.17.4",
|
|
200
|
+
"@justeattakeaway/pie-modal": "0.42.5",
|
|
201
|
+
"@justeattakeaway/pie-notification": "0.5.5",
|
|
202
|
+
"@justeattakeaway/pie-spinner": "0.6.4",
|
|
203
|
+
"@justeattakeaway/pie-switch": "0.29.4",
|
|
204
|
+
"@justeattakeaway/pie-tag": "0.9.5"
|
|
205
205
|
},
|
|
206
206
|
"volta": {
|
|
207
207
|
"extends": "../../../package.json"
|