Browse Source

无jira: 打包调整

es6
Treecat 2 years ago
parent
commit
5c740dc789
  1. 23
      packages/fineui/lib/prepublish.js
  2. 112
      packages/fineui/package.json
  3. 2
      publish.bat
  4. 2
      publish.sh

23
packages/fineui/lib/prepublish.js

@ -0,0 +1,23 @@
const { resolve } = require("path");
const { writeFileSync } = require("fs");
function pad2(n) {
// always returns a string
return (n < 10 ? "0" : "") + n;
}
const d = new Date();
const version =
d.getFullYear() +
pad2(d.getMonth() + 1) +
pad2(d.getDate()) +
pad2(d.getHours()) +
pad2(d.getMinutes()) +
pad2(d.getSeconds());
const packageJSON = require("../package.json");
const versionChars = packageJSON.version.split(".");
versionChars[versionChars.length - 1] = version;
packageJSON.version = versionChars.join(".");
packageJSON.publishConfig.registry = "https://npm.fineres.com/";
packageJSON.name = "@fui/core";
writeFileSync(resolve(__dirname, "../package.json"), JSON.stringify(packageJSON, null, 2));

112
packages/fineui/package.json

@ -1,57 +1,57 @@
{ {
"name": "@fui/core", "name": "@fui/core",
"version": "3.0.20230426142647", "version": "3.0.20230511185107",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"module": "dist/es/index.js", "module": "dist/lib/index.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",
"sideEffects": [ "sideEffects": [
"**/*.less", "**/*.less",
"src/**/*.js", "src/**/*.js",
"dist/es/index.js", "dist/lib/index.js",
"dist/es/core/element/index.js", "dist/lib/core/element/index.js",
"dist/es/core/system.js", "dist/lib/core/system.js",
"dist/es/core/platform/web/config.js", "dist/lib/core/platform/web/config.js",
"dist/es/core/platform/web/jquery/*.js", "dist/lib/core/platform/web/jquery/*.js",
"dist/es/polyfill/**/*.js", "dist/lib/polyfill/**/*.js",
"dist/es/case/ztree/jquery.ztree.core-3.5.js", "dist/lib/case/ztree/jquery.ztree.core-3.5.js",
"dist/es/case/ztree/jquery.ztree.excheck-3.5.js" "dist/lib/case/ztree/jquery.ztree.excheck-3.5.js"
], ],
"scripts": { "scripts": {
"dev": "tsc && run-p dev:*", "dev": "tsc && run-p dev:*",
"dev:es": "babel src -d dist/es --config-file ./esm.babel.js -w", "dev:es": "babel src -d dist/lib --config-file ./esm.babel.js -w --source-maps",
"dev:fineui": "webpack-dev-server --progress --config=webpack/webpack.dev.js", "dev:fineui": "webpack-dev-server --progress --config=webpack/webpack.dev.js",
"build": "tsc && run-p build:*", "build": "tsc && run-p build:*",
"build:es": "babel src -d dist/es --config-file ./esm.babel.js", "build:es": "babel src -d dist/lib --config-file ./esm.babel.js",
"build:fineui": "webpack --progress --config=webpack/webpack.prod.js", "build:fineui": "webpack --progress --config=webpack/webpack.prod.js",
"link": "pnpm link --global", "prepublishToPrivate": "npm run build && node ./lib/prepublish.js",
"tsc": "tsc" "publishToPrivate": "npm publish"
}, },
"files": [ "files": [
"dist", "dist",
"src/less" "src/less"
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.coding.net/fanruan/fineui.git" "url": "https://git.coding.net/fanruan/fineui.git"
}, },
"keywords": [ "keywords": [
"ui", "ui",
"fineui", "fineui",
"finebi" "finebi"
], ],
"publishConfig": { "publishConfig": {
"registry": "https://npm.fineres.com/", "registry": "https://npm.fineres.com/",
"access": "public" "access": "public"
}, },
"author": "fanruan", "author": "fanruan",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@juggle/resize-observer": "^3.4.0", "@juggle/resize-observer": "^3.4.0",
"@popperjs/core": "2.11.6", "@popperjs/core": "2.11.6",
"jquery": "3.6.3" "jquery": "3.6.3"
}, },
"devDependencies": { "devDependencies": {
"cross-env": "^7.0.3" "cross-env": "^7.0.3"
} }
} }

2
publish.bat

@ -0,0 +1,2 @@
cd packages/fineui
npm run publishToPrivate

2
publish.sh

@ -0,0 +1,2 @@
cd packages/fineui
npm run publishToPrivate
Loading…
Cancel
Save