Browse Source

Pull request #3546: 无jira: 打包调整

Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6

* commit '7e27700d1e1999bffb871ba4bcb503b0f290ec7b':
  无jira fix:删除没有用到的东西
  无jira fix:按需引入也导出Decorators
  无jira: 打包调整
es6
treecat-罗群 2 years ago committed by Dailer-刘荣歆
parent
commit
0ae0e28e5e
  1. 0
      packages/demo/src/demo/slides.js
  2. 23
      packages/fineui/lib/prepublish.js
  3. 28
      packages/fineui/package.json
  4. 3
      packages/fineui/src/bundle.js
  5. 4
      packages/fineui/src/index.js
  6. 2
      publish.bat
  7. 2
      publish.sh

0
packages/demo/src/demo/slides.js

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));

28
packages/fineui/package.json

@ -1,31 +1,31 @@
{
"name": "@fui/core",
"version": "3.0.20230426142647",
"version": "3.0.20230511185107",
"description": "fineui",
"main": "dist/fineui.min.js",
"module": "dist/es/index.js",
"module": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
"sideEffects": [
"**/*.less",
"src/**/*.js",
"dist/es/index.js",
"dist/es/core/element/index.js",
"dist/es/core/system.js",
"dist/es/core/platform/web/config.js",
"dist/es/core/platform/web/jquery/*.js",
"dist/es/polyfill/**/*.js",
"dist/es/case/ztree/jquery.ztree.core-3.5.js",
"dist/es/case/ztree/jquery.ztree.excheck-3.5.js"
"dist/lib/index.js",
"dist/lib/core/element/index.js",
"dist/lib/core/system.js",
"dist/lib/core/platform/web/config.js",
"dist/lib/core/platform/web/jquery/*.js",
"dist/lib/polyfill/**/*.js",
"dist/lib/case/ztree/jquery.ztree.core-3.5.js",
"dist/lib/case/ztree/jquery.ztree.excheck-3.5.js"
],
"scripts": {
"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",
"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",
"link": "pnpm link --global",
"tsc": "tsc"
"prepublishToPrivate": "npm run build && node ./lib/prepublish.js",
"publishToPrivate": "npm publish"
},
"files": [
"dist",

3
packages/fineui/src/bundle.js

@ -1,10 +1,9 @@
import * as fuiExport from "./index";
import * as injectFn from "@/core/5.inject";
import { _global } from "@/core/0.foundation";
import * as Decorators from "@/core/decorator";
_global.BI = _global.BI || {};
_global.BI.Decorators = { ...Decorators, Model: fuiExport.Fix.Model };
Object.assign(_global, {
Fix: fuiExport.Fix,

4
packages/fineui/src/index.js

@ -13,3 +13,7 @@ export * from "./router";
export * as Popper from "@popperjs/core";
export const jQuery = jquery;
export const $ = jquery;
import * as D from "@/core/decorator";
import { Fix } from "./fix";
export const Decorators = { ...D, Model: Fix.Model };

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