mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
feat: 添加只打包esm的npm script
This commit is contained in:
parent
2e5431f566
commit
9726094813
@ -16,6 +16,7 @@
|
||||
"fis3-dev": "fis3 release -cwd ./public",
|
||||
"deploy-gh-page": "sh ./deploy-gh-pages.sh",
|
||||
"build": "npm run build --workspaces",
|
||||
"build-esm": "npm run build-esm --workspaces",
|
||||
"test": "npm test --workspaces",
|
||||
"update-snapshot": "npm run update-snapshot --workspaces",
|
||||
"prepare": "husky install",
|
||||
|
@ -34,6 +34,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run clean-dist && NODE_ENV=production rollup -c ",
|
||||
"build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"dev": "rollup -c -w",
|
||||
"test": "jest",
|
||||
"update-snapshot": "jest --updateSnapshot",
|
||||
|
5
packages/amis-core/rollup.esm.config.js
Normal file
5
packages/amis-core/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
@ -28,6 +28,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Warnings: no test specified\"",
|
||||
"build": "npm run clean-dist && NODE_ENV=production rollup -c",
|
||||
"build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"clean-dist": "rimraf lib/* esm/*",
|
||||
"i18n:update": "npx i18n update --config=./i18nConfig.js",
|
||||
"i18n:translate": "npx i18n translate --config=./i18nConfig.js --l=en-US",
|
||||
|
5
packages/amis-editor-core/rollup.esm.config.js
Normal file
5
packages/amis-editor-core/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
@ -22,6 +22,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Warnings: no test specified\"",
|
||||
"build": "npm run clean-dist && NODE_ENV=production rollup -c ",
|
||||
"build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"clean-dist": "rimraf lib/** esm/**",
|
||||
"i18n:update": "npx i18n update --config=./i18nConfig.js",
|
||||
"i18n:translate": "npx i18n translate --config=./i18nConfig.js --l=en-US",
|
||||
|
5
packages/amis-editor/rollup.esm.config.js
Normal file
5
packages/amis-editor/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
@ -7,6 +7,7 @@
|
||||
"types": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "npm run clean-dist && npm run genDoc && cross-env NODE_ENV=production rollup -c && cp src/doc.md lib/doc.md && cp src/doc.md esm/doc.md",
|
||||
"build-esm": "npm run clean-dist && cross-env NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"lib": "npm run clean-dist && cross-env NODE_ENV=production IS_LIB=1 rollup -c",
|
||||
"clean-dist": "rimraf lib/**",
|
||||
"declaration": "tsc --project tsconfig-for-declaration.json --allowJs --declaration --emitDeclarationOnly --declarationDir ./lib --rootDir ./src",
|
||||
|
5
packages/amis-formula/rollup.esm.config.js
Normal file
5
packages/amis-formula/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
@ -7,6 +7,7 @@
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"build": "npm run clean-dist && NODE_ENV=production rollup -c ",
|
||||
"build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"dev": "rollup -c -w",
|
||||
"test": "jest",
|
||||
"gen-doc": "ts-node ./scripts/genDoc.ts",
|
||||
|
5
packages/amis-ui/rollup.esm.config.js
Normal file
5
packages/amis-ui/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
@ -11,6 +11,7 @@
|
||||
"coverage": "jest --coverage",
|
||||
"publish-to-internal": "sh build.sh && sh publish.sh",
|
||||
"build": "npm run clean-dist && sh build.sh",
|
||||
"build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"prettier": "prettier --write '{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}'",
|
||||
"build-schemas": "ts-node -O '{\"target\":\"es6\"}' ../../scripts/build-schemas.ts",
|
||||
"clean-dist": "rimraf lib/** esm/**"
|
||||
|
5
packages/amis/rollup.esm.config.js
Normal file
5
packages/amis/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
@ -8,6 +8,7 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "npm run clean-dist && cross-env NODE_ENV=production rollup -c ",
|
||||
"build-esm": "npm run clean-dist && cross-env NODE_ENV=production rollup -c rollup.esm.config.js",
|
||||
"test": "jest",
|
||||
"lib": "npm run clean-dist && cross-env NODE_ENV=production IS_LIB=1 rollup -c",
|
||||
"update-snapshot": "jest --updateSnapshot",
|
||||
|
5
packages/office-viewer/rollup.esm.config.js
Normal file
5
packages/office-viewer/rollup.esm.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
import config from "./rollup.config";
|
||||
|
||||
const esmConfig = config[1];
|
||||
|
||||
export default esmConfig;
|
Loading…
Reference in New Issue
Block a user