@warp-ds/elements 1.2.0 → 1.2.1-next.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.
Files changed (2) hide show
  1. package/README.md +9 -0
  2. package/package.json +10 -4
package/README.md CHANGED
@@ -32,6 +32,15 @@ pnpm add @warp-ds/elements
32
32
  ```html
33
33
  <script src="https://assets.finn.no/pkg/@warp-ds/elements/v1"></script>
34
34
  ```
35
+ ### Import components
36
+ This project builds both the whole Elements package and separate component packages that are published to EIK, making it possible for the user to choose to either import all of the components:
37
+ ```js
38
+ import '@warp-ds/elements';
39
+ ```
40
+ or a specific component:
41
+ ```js
42
+ import '@warp-ds/elements/components/toast';
43
+ ```
35
44
 
36
45
  ### Documentation
37
46
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-ds/elements",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.1-next.1",
5
5
  "description": "Custom elements for Warp",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "build:api": "npx esbuild ./packages/toast/api.js --outdir=dist --target=es2017 --bundle --sourcemap --format=esm --minify",
30
30
  "build:npm": "npx esbuild ./index.js --outdir=dist/ --target=es2017 --bundle --sourcemap --format=esm --minify",
31
31
  "watch:npm": "npx esbuild ./index.js --outdir=dist/ --target=es2017 --bundle --sourcemap --format=esm --minify --watch",
32
- "build": "pnpm run build:elements && tsc && vite build --mode lib && pnpm run build:api && node build-individual-elements.js",
32
+ "build": "pnpm run build:elements && tsc && vite build --mode lib && pnpm run build:api && node build-individual-elements.js && pnpm build:eik",
33
33
  "format": "prettier --write . --ignore-path .gitignore",
34
34
  "lint": "npm run lint:format && pnpm run lint:eslint",
35
35
  "lint:format": "prettier --check . --ignore-path .gitignore",
@@ -44,7 +44,8 @@
44
44
  "semantic-release": "semantic-release",
45
45
  "build:elements": "node build-elements.js",
46
46
  "messages:extract": "lingui extract",
47
- "messages:compile": "lingui compile"
47
+ "messages:compile": "lingui compile",
48
+ "build:eik": "node build-elements-eik.js"
48
49
  },
49
50
  "repository": {
50
51
  "type": "git",
@@ -56,6 +57,7 @@
56
57
  "@babel/eslint-parser": "7.22.5",
57
58
  "@chbphone55/classnames": "2.0.0",
58
59
  "@eik/cli": "^2.0.22",
60
+ "@eik/esbuild-plugin": "^1.1.43",
59
61
  "@lingui/cli": "^4.5.0",
60
62
  "@lingui/conf": "^4.5.0",
61
63
  "@open-wc/testing": "3.2.0",
@@ -104,7 +106,11 @@
104
106
  },
105
107
  "eik": {
106
108
  "server": "https://assets.finn.no",
107
- "files": "dist"
109
+ "type": "package",
110
+ "files": "eik",
111
+ "import-map": [
112
+ "https://assets.finn.no/map/custom-elements/v2"
113
+ ]
108
114
  },
109
115
  "config": {
110
116
  "commitizen": {