diff --git a/lerna.json b/lerna.json new file mode 100644 index 000000000..4ac3cfb82 --- /dev/null +++ b/lerna.json @@ -0,0 +1,4 @@ +{ + "packages": ["packages/*"], + "version": "2.0.0" +} diff --git a/package.json b/package.json index fd1e730c6..bdd848955 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,12 @@ "dev": "fis3 release -cwd ./public", "deploy-gh-page": "sh ./deploy-gh-pages.sh", "test": "jest", - "coverage": "jest --coverage" + "coverage": "jest --coverage", + "release": "lerna publish", + "release:beta": "lerna publish --canary --pre-dist-tag=beta --preid beta --yes" }, "devDependencies": { + "@types/jest": "^28.1.0", "fis-optimizer-terser": "^1.0.1", "fis-parser-sass": "^1.1.1", "fis-parser-svgr": "^1.0.0", @@ -30,9 +33,9 @@ "fis3-prepackager-stand-alone-pack": "^1.0.0", "fis3-preprocessor-js-require-css": "^0.1.3", "fis3-preprocessor-js-require-file": "^0.1.3", - "@types/jest": "^28.1.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", + "lerna": "^5.0.0", "ts-jest": "^28.0.3" }, "jest": { diff --git a/packages/amis-core/package.json b/packages/amis-core/package.json index 29900c19a..223d40596 100644 --- a/packages/amis-core/package.json +++ b/packages/amis-core/package.json @@ -1,6 +1,6 @@ { "name": "amis-core", - "version": "1.0.0-beta.8", + "version": "0.0.0", "description": "amis-core", "main": "lib/index.js", "module": "esm/index.js", @@ -34,7 +34,8 @@ "dev": "rollup -c -w", "test": "jest", "coverage": "jest --coverage", - "clean-dist": "rimraf lib/* esm/*" + "clean-dist": "rimraf lib/* esm/*", + "prepublishOnly": "npm run build" }, "files": [ "lib", diff --git a/packages/amis-formula/package.json b/packages/amis-formula/package.json index 6188efc8b..3c80ddcc7 100644 --- a/packages/amis-formula/package.json +++ b/packages/amis-formula/package.json @@ -1,6 +1,6 @@ { "name": "amis-formula", - "version": "2.0.0-beta.2", + "version": "0.0.0", "description": "负责 amis 里面的表达式实现,内置公式,编辑器等", "main": "dist/index.js", "scripts": { @@ -10,7 +10,8 @@ "declaration": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir ./dist --rootDir ./src", "test": "jest", "coverage": "jest --coverage", - "genDoc": "ts-node ./scripts/genDoc.ts" + "genDoc": "ts-node ./scripts/genDoc.ts", + "prepublishOnly": "npm run build" }, "repository": { "type": "git", diff --git a/packages/amis-ui/package.json b/packages/amis-ui/package.json index 4c8a16c72..f6cc8091c 100644 --- a/packages/amis-ui/package.json +++ b/packages/amis-ui/package.json @@ -2,14 +2,15 @@ "name": "amis-ui", "main": "lib/index.js", "module": "esm/index.js", - "version": "1.0.0-beta.1", + "version": "0.0.0", "description": "", "scripts": { "build": "npm run clean-dist && NODE_ENV=production rollup -c ", "dev": "rollup -c -w", "test": "jest", "coverage": "jest --coverage", - "clean-dist": "rimraf lib/* esm/*" + "clean-dist": "rimraf lib/* esm/*", + "prepublishOnly": "npm run build" }, "author": "fex", "license": "Apache-2.0", diff --git a/packages/amis/package.json b/packages/amis/package.json index f6b889ebb..b2c628030 100644 --- a/packages/amis/package.json +++ b/packages/amis/package.json @@ -1,6 +1,6 @@ { "name": "amis", - "version": "2.0.0-beta.0", + "version": "0.0.0", "description": "一种MIS页面生成工具", "main": "lib/index.js", "module": "esm/index.js", @@ -10,7 +10,8 @@ "publish-to-internal": "sh build.sh && sh publish.sh", "build": "sh build.sh", "prettier": "prettier --write '{src,scss,examples}/**/**/*.{js,jsx,ts,tsx,scss,json}'", - "build-schemas": "ts-node -O '{\"target\":\"es6\"}' ../../scripts/build-schemas.ts" + "build-schemas": "ts-node -O '{\"target\":\"es6\"}' ../../scripts/build-schemas.ts", + "prepublishOnly": "npm run build" }, "repository": { "type": "git",