@justeattakeaway/pie-webc 0.2.9 → 0.3.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 CHANGED
@@ -32,6 +32,23 @@ $ npm i @justeattakeaway/pie-webc
32
32
  $ yarn add @justeattakeaway/pie-webc
33
33
  ```
34
34
 
35
+ ## Importing components
36
+
37
+ Simply import each one individually using its specific entrypoint.
38
+
39
+ ```js
40
+ import '@justeattakeaway/pie-webc/components/button.js';
41
+ import '@justeattakeaway/pie-webc/components/modal.js';
42
+ ```
43
+
44
+ And for React applications:
45
+
46
+ ```jsx
47
+ import { PieButton } from '@justeattakeaway/pie-webc/react/button.js';
48
+ import { PieModal } from '@justeattakeaway/pie-webc/react/modal.js';
49
+ ```
50
+
51
+
35
52
  For full information on using PIE components as part of an application, check out the [Getting Started Guide](https://github.com/justeattakeaway/pie/wiki/Getting-started-with-PIE-Web-Components).
36
53
 
37
54
  ## Contributing
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-button';
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-button';
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-modal';
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-modal';
package/package.json CHANGED
@@ -1,22 +1,39 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-webc",
3
3
  "description": "Component bundle containing all PIE web components",
4
- "version": "0.2.9",
4
+ "version": "0.3.0",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
6
  "files": [
10
- "dist",
7
+ "**/*.js",
11
8
  "**/*.d.ts"
12
9
  ],
10
+ "exports": {
11
+ "./components/button.js": {
12
+ "import": "./components/button.js",
13
+ "require": "./components/button.js",
14
+ "types": "./components/button.d.ts"
15
+ },
16
+ "./react/button.js": {
17
+ "import": "./react/button.js",
18
+ "require": "./react/button.js",
19
+ "types": "./react/button.d.ts"
20
+ },
21
+ "./components/modal.js": {
22
+ "import": "./components/modal.js",
23
+ "require": "./components/modal.js",
24
+ "types": "./components/modal.d.ts"
25
+ },
26
+ "./react/modal.js": {
27
+ "import": "./react/modal.js",
28
+ "require": "./react/modal.js",
29
+ "types": "./react/modal.d.ts"
30
+ }
31
+ },
13
32
  "scripts": {
14
- "build": "run -T vite build",
15
33
  "lint:scripts": "run -T eslint .",
16
34
  "lint:scripts:fix": "yarn lint:scripts --fix",
17
35
  "lint:style": "echo \"Error: no scss / css to lint\" && exit 0",
18
36
  "lint:style:fix": "yarn lint:style --fix",
19
- "watch": "run -T vite build --watch",
20
37
  "test": "echo \"Error: no test specified\" && exit 0",
21
38
  "test:ci": "yarn test"
22
39
  },
@@ -27,13 +44,12 @@
27
44
  },
28
45
  "dependencies": {
29
46
  "@justeattakeaway/pie-button": "0.47.3",
30
- "@justeattakeaway/pie-modal": "0.42.3",
31
- "@justeattakeaway/pie-webc-core": "0.21.1"
47
+ "@justeattakeaway/pie-modal": "0.42.3"
32
48
  },
33
49
  "volta": {
34
50
  "extends": "../../../package.json"
35
51
  },
36
52
  "sideEffects": [
37
- "dist/*.js"
53
+ "**/*.js"
38
54
  ]
39
55
  }
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-button/dist/react.js';
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-button/dist/react.js';
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-modal/dist/react.js';
package/react/modal.js ADDED
@@ -0,0 +1 @@
1
+ export * from '@justeattakeaway/pie-modal/dist/react.js';
package/dist/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { PieButton } from '@justeattakeaway/pie-button';
2
- import { PieModal } from '@justeattakeaway/pie-modal';
3
-
4
- export { PieButton }
5
-
6
- export { PieModal }
7
-
8
- export { }
package/dist/index.js DELETED
@@ -1,6 +0,0 @@
1
- import { PieButton as r } from "@justeattakeaway/pie-button";
2
- import { PieModal as f } from "@justeattakeaway/pie-modal";
3
- export {
4
- r as PieButton,
5
- f as PieModal
6
- };
package/dist/react.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { PieButton } from '@justeattakeaway/pie-button/dist/react';
2
- import { PieModal } from '@justeattakeaway/pie-modal/dist/react';
3
-
4
- export { PieButton }
5
-
6
- export { PieModal }
7
-
8
- export { }
package/dist/react.js DELETED
@@ -1,6 +0,0 @@
1
- import { PieButton as r } from "@justeattakeaway/pie-button/dist/react";
2
- import { PieModal as f } from "@justeattakeaway/pie-modal/dist/react";
3
- export {
4
- r as PieButton,
5
- f as PieModal
6
- };