Skip to content

Commit

Permalink
map esm modules and types
Browse files Browse the repository at this point in the history
  • Loading branch information
goulinkh committed Sep 16, 2024
1 parent ce48755 commit 1bdb95f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
dist
dist-esm
dist-types
.env.local
.DS_Store
.idea
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@canonical/react-components",
"version": "0.47.3",
"main": "dist/index.js",
"module": "dist/index.js",
"module": "dist-esm/index.js",
"types": "dist-types/index.d.ts",
"author": {
"email": "webteam@canonical.com",
"name": "Canonical Webteam"
Expand Down Expand Up @@ -126,11 +127,10 @@
"vanilla-framework": "^3.15.1 || ^4.0.0"
},
"scripts": {
"build": "rm -rf dist && yarn build-cjs && yarn build-declaration && yarn build-esm && yarn build-declaration-esm",
"build-cjs": "NODE_ENV=production BABEL_ENV=cjs babel src --out-dir dist --copy-files --extensions '.js,.jsx,.ts,.tsx'",
"build-declaration": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json",
"build-esm": "NODE_ENV=production BABEL_ENV=esm babel src --out-dir dist/esm --copy-files --extensions '.js,.jsx,.ts,.tsx'",
"build-declaration-esm": "tsc --project tsconfig.json --outDir dist/esm && tsc-alias -p tsconfig.json --outDir dist/esm",
"build": "yarn build-cjs && yarn build-declaration && yarn build-esm",
"build-cjs": "rm -rf dist && NODE_ENV=production BABEL_ENV=cjs babel src --out-dir dist --copy-files --extensions '.js,.jsx,.ts,.tsx'",
"build-esm": "rm -rf dist-esm && NODE_ENV=production BABEL_ENV=esm babel src --out-dir dist-esm --copy-files --extensions '.js,.jsx,.ts,.tsx'",
"build-declaration": "rm -rf dist-types && tsc --project tsconfig.json --outDir dist-types && tsc-alias -p tsconfig.json --outDir dist-types",
"build-watch": "yarn run build-cjs --watch",
"build-docs": "storybook build -c .storybook -o docs",
"clean": "rm -rf node_modules dist .out",
Expand Down

0 comments on commit 1bdb95f

Please sign in to comment.