|
5 | 5 | "license": "SEE LICENSE IN LICENSE.txt", |
6 | 6 | "scripts": { |
7 | 7 | "build:workspaces": "yarn workspaces foreach -Rti --from @elastic/eui-theme-borealis --exclude @elastic/eui-theme-borealis run build", |
8 | | - "build": "tsc", |
| 8 | + "build:clean": "rimraf lib/", |
| 9 | + "build": "yarn build:clean && yarn build:compile && yarn build:compile:cjs && yarn build:types", |
| 10 | + "build:compile": "tsc --project ./tsconfig.json", |
| 11 | + "build:compile:cjs": "NODE_ENV=production NO_COREJS_POLYFILL=true babel src --out-dir=lib/cjs --extensions .js,.ts,.tsx --source-maps=true", |
| 12 | + "build:types": "NODE_ENV=production tsc --project tsconfig.types.json", |
9 | 13 | "build-pack": "yarn build && npm pack", |
10 | 14 | "lint": "yarn tsc --noEmit && yarn lint-es && yarn lint-sass", |
11 | 15 | "lint-es": "eslint --cache src/**/*.ts --max-warnings 0", |
|
20 | 24 | }, |
21 | 25 | "private": true, |
22 | 26 | "devDependencies": { |
| 27 | + "@babel/cli": "^7.21.5", |
| 28 | + "@babel/core": "^7.21.8", |
| 29 | + "@babel/preset-env": "^7.21.5", |
| 30 | + "@babel/preset-react": "^7.18.6", |
| 31 | + "@babel/preset-typescript": "^7.21.5", |
23 | 32 | "@elastic/eui-theme-common": "workspace:^", |
24 | 33 | "@types/jest": "^29.5.12", |
25 | 34 | "@types/prettier": "2.7.3", |
|
33 | 42 | "eslint-plugin-prettier": "^4.2.1", |
34 | 43 | "jest": "^29.7.0", |
35 | 44 | "prettier": "^2.8.8", |
| 45 | + "rimraf": "^6.0.1", |
36 | 46 | "stylelint": "^15.7.0", |
37 | 47 | "stylelint-config-prettier-scss": "^1.0.0", |
38 | 48 | "stylelint-config-standard": "^33.0.0", |
|
42 | 52 | "peerDependencies": { |
43 | 53 | "@elastic/eui-theme-common": "0.0.1" |
44 | 54 | }, |
45 | | - "main": "lib/index.js", |
| 55 | + "main": "lib/cjs/index.js", |
46 | 56 | "exports": { |
47 | 57 | "./lib/*": "./lib/*", |
48 | 58 | ".": { |
49 | | - "default": "./lib/index.js" |
| 59 | + "require": "./lib/cjs/index.js", |
| 60 | + "import": "./lib/esm/index.js", |
| 61 | + "default": "./lib/cjs/index.js" |
50 | 62 | } |
51 | 63 | }, |
52 | 64 | "files": [ |
|
0 commit comments