diff --git a/lib/publish/publish.js b/lib/publish/publish.js new file mode 100644 index 0000000000..7506fd72bf --- /dev/null +++ b/lib/publish/publish.js @@ -0,0 +1,3 @@ +const { execSync } = require("child_process"); + +execSync(`npm publish --tag 2.0.${new Date().getTime()}`); diff --git a/package.json b/package.json index 87f32a6e84..6a7e114d9f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "1.1.2", + "version": "2.0", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", @@ -76,7 +76,9 @@ "fake": "grunt fake-build", "test": "karma start", "analyze": "grunt analyze", - "dev": "npm-run-all --parallel grunt webpack:dev" + "dev": "npm-run-all --parallel grunt webpack:dev", + "prepublish": "npm run build", + "publish": "node ./lib/publish/publish.js" }, "repository": { "type": "git", @@ -87,6 +89,9 @@ "fineui", "finebi" ], + "publishConfig": { + "registry": "http://192.168.5.154:4873" + }, "author": "fanruan", "license": "MIT" }