Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"lib"
],
"scripts": {
"clean": "rm -rf dist && rm -rf es && rm -rf lib",
"clean": "rimraf dist es lib",
"prebuild": "npm run clean",
"prefix": "NODE_ENV=production postcss dist/index.css -o dist/index.css",
"prefix": "cross-env NODE_ENV=production postcss dist/index.css -o dist/index.css",
"copy:less": "copyfiles -u 1 src/**/*.less src/**/**/*.less es",
"js:cjs": "BABEL_ENV=cjs babel src -d lib --extensions '.ts,.tsx'",
"js:esm": "BABEL_ENV=esm babel src -d es --extensions '.ts,.tsx'",
"js:cjs": "cross-env BABEL_ENV=cjs babel src -d lib --extensions '.ts,.tsx'",
"js:esm": "cross-env BABEL_ENV=esm babel src -d es --extensions '.ts,.tsx'",
"build:types": "tsc -p tsconfig.build.json",
"build": "npm run js:cjs && npm run js:esm && npm run build:types",
"build": "npm run js:cjs && npm run js:esm && npm run build:types && npm run build:css",
"build:css": "lessc src/styles/index.less dist/index.css && npm run prefix && npm run copy:less",
"build:umd": "BABEL_ENV=umd rollup -c && npm run build:css",
"build:umd": "cross-env BABEL_ENV=umd rollup -c && npm run build:css",
"prepublishOnly": "npm run build && npm run build:umd",
"test": "jest",
"test:watch": "jest --watch",
Expand Down Expand Up @@ -55,6 +55,7 @@
"@testing-library/react": "^12.1.5",
"@types/dompurify": "^2.4.0",
"@types/jest": "^29.5.2",
"@types/node": "^24.0.14",
"@types/react": "^17.0.62",
"@types/react-dom": "^17.0.20",
"@types/resize-observer-browser": "^0.1.7",
Expand Down Expand Up @@ -82,7 +83,9 @@
"react-dom": "17.0.2",
"rollup": "^2.79.1",
"ts-jest": "^29.1.1",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"rimraf": "^6.0.1",
"cross-env": "^7.0.3"
},
"peerDependencies": {
"react": ">=16.8.0",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"rootDir": "src",
"declaration": true,
"declarationDir": "lib",
"emitDeclarationOnly": true
"emitDeclarationOnly": true,
"types": ["node"]
},
"exclude": [
"node_modules",
Expand Down