Browse Source

Pull request #1493: KERNEL-5172 npm上传至私有npm+自动打包+自动修改版本号

Merge in VISUAL/fineui from ~TELLER/fineui:bugfix to master

* commit '44d31ab160193a68366105b3b0bee83aa2d475d3':
  chore: 增加脚本
  auto upgrade version to 2.0.20200907174012
  auto upgrade version to 2.0.20200907173112
es6
Teller 4 years ago
parent
commit
eab48d3bcb
  1. 4
      dist/2.0/fineui.css
  2. 4
      dist/2.0/fineui.ie.min.js
  3. 2
      dist/2.0/fineui.ie.min.js.map
  4. 5260
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.js.map
  6. 4
      dist/2.0/fineui.min.css
  7. 4
      dist/2.0/fineui.min.js
  8. 2
      dist/2.0/fineui.min.js.map
  9. 4
      dist/2.0/fineui_without_normalize.css
  10. 4
      dist/2.0/fineui_without_normalize.min.css
  11. 4
      dist/bundle.min.css
  12. 4
      dist/bundle.min.js
  13. 2
      dist/bundle.min.js.map
  14. 4
      dist/demo.css
  15. 5638
      dist/demo.js
  16. 2
      dist/demo.js.map
  17. 4
      dist/fineui.css
  18. 4
      dist/fineui.ie.min.js
  19. 2
      dist/fineui.ie.min.js.map
  20. 5294
      dist/fineui.js
  21. 2
      dist/fineui.js.map
  22. 4
      dist/fineui.min.css
  23. 4
      dist/fineui.min.js
  24. 2
      dist/fineui.min.js.map
  25. 4367
      dist/fineui_without_jquery_polyfill.js
  26. 2
      dist/fineui_without_jquery_polyfill.js.map
  27. 2
      dist/font.css
  28. 3
      dist/lib/base/combination/combo.d.ts
  29. 8
      dist/lib/base/single/button/button.node.d.ts
  30. 2
      dist/lib/core/base.d.ts
  31. 21
      dist/lib/core/decorator/decorator.d.ts
  32. 40
      dist/lib/core/inject.d.ts
  33. 2
      dist/lib/core/ob.d.ts
  34. 12
      dist/lib/core/plugin.d.ts
  35. 6
      dist/lib/index.d.ts
  36. 340
      dist/utils.js
  37. 2
      dist/utils.js.map
  38. 4
      dist/utils.min.js
  39. 2
      dist/utils.min.js.map
  40. 15
      lib/postpublish/postpublish.js
  41. 4
      lib/prepublish/prepublish.js
  42. 9
      package.json
  43. 2
      publish.bat
  44. 2
      publish.sh

4
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

5260
dist/2.0/fineui.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

5638
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

5294
dist/fineui.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

4367
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

3
dist/lib/base/combination/combo.d.ts vendored

@ -1,12 +1,13 @@
import { _Widget } from "../../core/widget";
export interface _Combo extends _Widget {
populate(items: any): void;
populate(...args: any[]): void;
_setEnable(v: boolean): void;
isViewVisible(): boolean;
showView(e?: any): void;
hideView(): void;
getView(): any;
getPopupPosition(): any;
adjustHeight(e?: MouseEvent): void;
toggle(): void;
}
export interface _ComboStatic {

8
dist/lib/base/single/button/button.node.d.ts vendored

@ -1,7 +1,7 @@
import { _BasicButton } from "./button.basic";
export interface _NodeButton extends _BasicButton {
isOpened: () => void;
setOpened: (b: boolean) => void;
triggerCollapse: () => void;
triggerExpand: () => void;
isOpened(): void;
setOpened(b: boolean): void;
triggerCollapse(): void;
triggerExpand(): void;
}

2
dist/lib/core/base.d.ts vendored

@ -45,7 +45,7 @@ export interface _base {
lastKey: (obj: object) => string;
firstObject: (obj: object) => any;
lastObject: (obj: object) => any;
concat: (obj1: any, obj2: any) => any;
concat: (obj1: any, obj2: any, ...args: any[]) => any;
backEach: (obj: any, predicate: Function, context?: any) => boolean;
backAny: (obj: any, predicate: Function, context?: any) => boolean;
backEvery: (obj: any, predicate: Function, context?: any) => boolean;

21
dist/lib/core/decorator/decorator.d.ts vendored

@ -34,6 +34,27 @@ export declare function store<T>(Model: Constructor<T> & {
_store(): any;
};
} & U;
/**
* mixin
* ie8下不能使用
*/
export declare function mixin<T>(): (Target: Constructor<T> & {
xtype: string;
}) => void;
/**
* mixins属性
* ie8下不能使用
* @param Mixins
*/
export declare function mixins(...Mixins: ({
new (...args: any[]): {};
} & {
xtype: string;
})[]): <U extends new (...args: any[]) => {}>(constructor: U) => {
new (...args: any[]): {
mixins: string[];
};
} & U;
/**
* Model基类
*/

40
dist/lib/core/inject.d.ts vendored

@ -0,0 +1,40 @@
declare type _module = (xtype: string, cls: any) => void;
declare type _constant = (xtype: string, cls: any) => void;
declare type _model = (xtype: string, cls: any) => void;
declare type _store = (xtype: string, cls: any) => void;
declare type _service = (xtype: string, cls: any) => void;
declare type _provider = (xtype: string, cls: any) => void;
interface _modules {
getModule: (type: string) => any;
getAllModules: () => any;
}
interface _constants {
getConstant: (type: string) => any;
}
interface _models {
getModel: (type: string, options?: any) => any;
}
interface _stores {
getStore: (type: string, options?: any) => any;
}
interface _providers {
getProvider: (type: string, options?: any) => any;
}
interface _services {
getService: (type: string, options?: any) => any;
}
export declare type _inject = {
module: _module;
constant: _constant;
model: _model;
store: _store;
provider: _provider;
service: _service;
Modules: _modules;
Constants: _constants;
Models: _models;
Stores: _stores;
Providers: _providers;
Services: _services;
};
export {};

2
dist/lib/core/ob.d.ts vendored

@ -14,7 +14,7 @@ export interface _OB {
_getEvents(): {
[eventName: string]: Function[];
};
on(eventName: string, fn: Function): void;
on(eventName: string, fn: Function): Function;
once(eventName: string, fn: Function): void;
un(eName: string, fn: Function): void;
_initRef(): void;

12
dist/lib/core/plugin.d.ts vendored

@ -0,0 +1,12 @@
import { _Widget } from "./widget";
declare type configWidgetFn = (options: object) => object;
declare type configObjectFn = (widget: _Widget) => void;
export declare type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void;
export declare type _configWidget = (shorcut: string, widgetFunction: configWidgetFn) => void;
export declare type _registerObject = (shorcut: string, objectFunction: configObjectFn) => void;
export declare type _Plugin = {
config: _config;
configWidget: _configWidget;
registerObject: _registerObject;
};
export {};

6
dist/lib/index.d.ts vendored

@ -33,8 +33,10 @@ import { _RedMarkBehavior } from "./core/behavior/behavior.redmark";
import * as decorator from "./core/decorator/decorator";
import { _func } from "./core/func";
import { _i18n } from "./core/i18n";
import { _Plugin } from "./core/plugin";
import { _OB } from "./core/ob";
import { _Widget, _WidgetStatic } from "./core/widget";
import { _inject } from "./core/inject";
import { _Layout } from "./core/wrapper/layout";
import { _AbsoluteLayout } from "./core/wrapper/layout/layout.absolute";
import { _HTapeLayout, _VTapeLayout } from "./core/wrapper/layout/layout.tape";
@ -44,9 +46,11 @@ declare type ClassConstructor<T extends {}> = T & {
new (config: any): T;
(config: any): T;
readonly prototype: T;
readonly xtype: string;
};
export interface BI extends _func, _i18n, _base {
export interface BI extends _func, _i18n, _base, _inject {
OB: ClassConstructor<_OB>;
Plugin: _Plugin;
Widget: ClassConstructor<_Widget> & _WidgetStatic;
Single: ClassConstructor<_Single>;
BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic;

340
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-7-3 12:02:09 */
/*! time: 2020-9-7 17:39:01 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1073);
/******/ return __webpack_require__(__webpack_require__.s = 1081);
/******/ })
/************************************************************************/
/******/ ({
@ -556,6 +556,8 @@ if (!_global.BI) {
for (var i = 0; i < array.length; i++) {
if (BI.isNull(value)) {
map[array[i]] = array[i];
} else if (BI.isFunction(value)) {
map[array[i]] = value(i, array[i]);
} else {
map[array[i]] = BI.deepClone(value);
}
@ -1686,7 +1688,7 @@ if (!_global.BI) {
/***/ (function(module, exports) {
!(function () {
function extend () {
function extend() {
var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy;
for (; i < length; i++) {
// Only deal with non-null/undefined values
@ -1715,10 +1717,10 @@ if (!_global.BI) {
* @class BI.OB
* @abstract
*/
BI.OB = function (config) {
var OB = function (config) {
this._constructor(config);
};
_.extend(BI.OB.prototype, {
_.extend(OB.prototype, {
props: {},
init: null,
destroyed: null,
@ -1773,8 +1775,8 @@ if (!_global.BI) {
},
_getEvents: function () {
if (!_.isArray(this.events)) {
this.events = [];
if (!_.isObject(this.events)) {
this.events = {};
}
return this.events;
},
@ -1785,6 +1787,7 @@ if (!_global.BI) {
* @param {Function} fn 事件对应的执行函数
*/
on: function (eventName, fn) {
var self = this;
eventName = eventName.toLowerCase();
var fns = this._getEvents()[eventName];
if (!_.isArray(fns)) {
@ -1792,6 +1795,10 @@ if (!_global.BI) {
this._getEvents()[eventName] = fns;
}
fns.push(fn);
return function () {
self.un(eventName, fn);
};
},
/**
@ -1835,7 +1842,7 @@ if (!_global.BI) {
*/
purgeListeners: function () {
/* alex:清空events*/
this.events = [];
this.events = {};
},
/**
* 触发绑定过的事件
@ -1871,120 +1878,9 @@ if (!_global.BI) {
this.purgeListeners();
}
});
BI.OB = BI.OB || OB;
})();
/***/ }),
/***/ 1073:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(101);
__webpack_require__(102);
__webpack_require__(130);
__webpack_require__(123);
__webpack_require__(126);
__webpack_require__(127);
__webpack_require__(124);
__webpack_require__(125);
__webpack_require__(105);
__webpack_require__(107);
__webpack_require__(122);
__webpack_require__(129);
__webpack_require__(128);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(110);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(113);
__webpack_require__(114);
__webpack_require__(115);
__webpack_require__(116);
__webpack_require__(117);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(120);
__webpack_require__(121);
__webpack_require__(744);
__webpack_require__(1074);
__webpack_require__(131);
__webpack_require__(132);
module.exports = __webpack_require__(133);
/***/ }),
/***/ 1074:
/***/ (function(module, exports) {
/**
* Created by astronaut007 on 2018/8/8
*/
// 牵扯到国际化这些常量在页面加载后再生效
// full day names
BI.Date = BI.Date || {};
BI.Date._DN = ["星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日"];
// short day names
BI.Date._SDN = ["日",
"一",
"二",
"三",
"四",
"五",
"六",
"日"];
// Monday first, etc.
BI.Date._FD = 1;
// full month namesdat
BI.Date._MN = [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月"];
// short month names
BI.Date._SMN = [0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11];
BI.Date._QN = ["", "第1季度",
"第2季度",
"第3季度",
"第4季度"];
/** Adds the number of days array to the Date object. */
BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以
BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];
/***/ }),
@ -4338,6 +4234,119 @@ BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];
});
}());
/***/ }),
/***/ 1081:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(101);
__webpack_require__(102);
__webpack_require__(130);
__webpack_require__(123);
__webpack_require__(126);
__webpack_require__(127);
__webpack_require__(124);
__webpack_require__(125);
__webpack_require__(105);
__webpack_require__(107);
__webpack_require__(122);
__webpack_require__(129);
__webpack_require__(128);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(110);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(113);
__webpack_require__(114);
__webpack_require__(115);
__webpack_require__(116);
__webpack_require__(117);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(120);
__webpack_require__(121);
__webpack_require__(746);
__webpack_require__(1082);
__webpack_require__(131);
__webpack_require__(132);
module.exports = __webpack_require__(133);
/***/ }),
/***/ 1082:
/***/ (function(module, exports) {
/**
* Created by astronaut007 on 2018/8/8
*/
// 牵扯到国际化这些常量在页面加载后再生效
// full day names
BI.Date = BI.Date || {};
BI.Date._DN = ["星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
"星期日"];
// short day names
BI.Date._SDN = ["日",
"一",
"二",
"三",
"四",
"五",
"六",
"日"];
// Monday first, etc.
BI.Date._FD = 1;
// full month namesdat
BI.Date._MN = [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月"];
// short month names
BI.Date._SMN = [0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11];
BI.Date._QN = ["", "第1季度",
"第2季度",
"第3季度",
"第4季度"];
/** Adds the number of days array to the Date object. */
BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以
BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];
/***/ }),
/***/ 109:
@ -7838,7 +7847,7 @@ _.extend(BI, {
* 基本的函数
* Created by GUY on 2015/6/24.
*/
BI.Func = {};
BI.Func = BI.Func || {};
_.extend(BI.Func, {
/**
* 创建唯一的名字
@ -7928,6 +7937,55 @@ _.extend(BI.Func, {
match: matched,
find: find
};
},
/**
* 获取按GB2312排序的结果
* @param items
* @param key
* @return {any[]}
*/
getSortedResult: function (items, key) {
var getTextOfItem = BI.isFunction(key) ? key :
function (item, key) {
if (BI.isNotNull(key)) {
return item[key];
}
if (BI.isNotNull(item.text)) {
return item.text;
}
if (BI.isNotNull(item.value)) {
return item.value;
}
return item;
};
return items.sort(function (item1, item2) {
var str1 = getTextOfItem(item1, key);
var str2 = getTextOfItem(item2, key);
if (BI.isNull(str1) && BI.isNull(str2)) {
return 0;
}
if (BI.isNull(str1)) {
return -1;
}
if (BI.isNull(str2)) {
return 1;
}
if (str1 === str2) {
return 0;
}
var len1 = str1.length, len2 = str2.length;
for (var i = 0; i < len1 && i < len2; i++) {
var char1 = str1[i];
var char2 = str2[i];
if (char1 !== char2) {
// 找不到的字符都往后面放
return (BI.isNull(BI.CODE_INDEX[char1]) ? BI.MAX : BI.CODE_INDEX[char1]) - (BI.isNull(BI.CODE_INDEX[char2]) ? BI.MAX : BI.CODE_INDEX[char2]);
}
}
return len1 - len2;
});
}
});
@ -7955,6 +8013,7 @@ _.extend(BI, {
}
});
/***/ }),
/***/ 126:
@ -8289,7 +8348,7 @@ _.extend(BI, {
(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
BI.module = BI.module || function (xtype, cls) {
if (moduleInjection[xtype] != null) {
_global.console && console.error("module:[" + xtype + "] has been registed");
}
@ -8297,7 +8356,7 @@ _.extend(BI, {
};
var constantInjection = {};
BI.constant = function (xtype, cls) {
BI.constant = BI.constant || function (xtype, cls) {
if (constantInjection[xtype] != null) {
_global.console && console.error("constant:[" + xtype + "] has been registed");
}
@ -8305,7 +8364,7 @@ _.extend(BI, {
};
var modelInjection = {};
BI.model = function (xtype, cls) {
BI.model = BI.model || function (xtype, cls) {
if (modelInjection[xtype] != null) {
_global.console && console.error("model:[" + xtype + "] has been registed");
}
@ -8313,7 +8372,7 @@ _.extend(BI, {
};
var storeInjection = {};
BI.store = function (xtype, cls) {
BI.store = BI.store || function (xtype, cls) {
if (storeInjection[xtype] != null) {
_global.console && console.error("store:[" + xtype + "] has been registed");
}
@ -8321,7 +8380,7 @@ _.extend(BI, {
};
var serviceInjection = {};
BI.service = function (xtype, cls) {
BI.service = BI.service || function (xtype, cls) {
if (serviceInjection[xtype] != null) {
_global.console && console.error("service:[" + xtype + "] has been registed");
}
@ -8329,7 +8388,7 @@ _.extend(BI, {
};
var providerInjection = {};
BI.provider = function (xtype, cls) {
BI.provider = BI.provider || function (xtype, cls) {
if (providerInjection[xtype] != null) {
_global.console && console.error("provider:[" + xtype + "] has been registed");
}
@ -8337,7 +8396,7 @@ _.extend(BI, {
};
var configFunctions = {};
BI.config = function (type, configFn) {
BI.config = BI.config || function (type, configFn, opt) {
if (BI.initialized) {
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
@ -8352,7 +8411,7 @@ _.extend(BI, {
}
return configFn(providers[type]);
}
return BI.Plugin.configWidget(type, configFn);
return BI.Plugin.configWidget(type, configFn, opt);
}
if (!configFunctions[type]) {
configFunctions[type] = [];
@ -8383,7 +8442,7 @@ _.extend(BI, {
var actions = {};
var globalAction = [];
BI.action = function (type, actionFn) {
BI.action = BI.action || function (type, actionFn) {
if (BI.isFunction(type)) {
globalAction.push(type);
return function () {
@ -8407,7 +8466,7 @@ _.extend(BI, {
};
var points = {};
BI.point = function (type, action, pointFn, after) {
BI.point = BI.point || function (type, action, pointFn, after) {
if (!points[type]) {
points[type] = {};
}
@ -8420,7 +8479,7 @@ _.extend(BI, {
points[type][action][after ? "after" : "before"].push(pointFn);
};
BI.Modules = {
BI.Modules = BI.Modules || {
getModule: function (type) {
if (!moduleInjection[type]) {
_global.console && console.error("module:[" + type + "] does not exists");
@ -8433,7 +8492,7 @@ _.extend(BI, {
}
};
BI.Constants = {
BI.Constants = BI.Constants || {
getConstant: function (type) {
return constantInjection[type];
}
@ -8477,7 +8536,7 @@ _.extend(BI, {
});
};
BI.Models = {
BI.Models = BI.Models || {
getModel: function (type, config) {
var inst = new modelInjection[type](config);
inst._constructor && inst._constructor(config);
@ -8489,7 +8548,7 @@ _.extend(BI, {
var stores = {};
BI.Stores = {
BI.Stores = BI.Stores || {
getStore: function (type, config) {
if (stores[type]) {
return stores[type];
@ -8505,7 +8564,7 @@ _.extend(BI, {
var services = {};
BI.Services = {
BI.Services = BI.Services || {
getService: function (type, config) {
if (services[type]) {
return services[type];
@ -8519,7 +8578,7 @@ _.extend(BI, {
var providers = {},
providerInstance = {};
BI.Providers = {
BI.Providers = BI.Providers || {
getProvider: function (type, config) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
@ -8531,7 +8590,7 @@ _.extend(BI, {
}
};
BI.Actions = {
BI.Actions = BI.Actions || {
runAction: function (type, event, config) {
BI.each(actions[type], function (i, act) {
try {
@ -8553,7 +8612,7 @@ _.extend(BI, {
}
};
BI.getContext = function (type, config) {
BI.getContext = BI.getContext || function (type, config) {
if (constantInjection[type]) {
return BI.Constants.getConstant(type);
}
@ -8572,6 +8631,7 @@ _.extend(BI, {
};
})();
/***/ }),
/***/ 13:
@ -9106,7 +9166,7 @@ process.umask = function () {
/***/ }),
/***/ 744:
/***/ 746:
/***/ (function(module, exports) {
BI.i18n = {

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

15
lib/postpublish/postpublish.js

@ -0,0 +1,15 @@
const { resolve } = require("path");
const { execSync } = require("child_process");
const { writeFileSync } = require("fs");
const packageJSON = require("../../package.json");
packageJSON.name = "fineui";
packageJSON.publishConfig.registry = 'https://registry.npmjs.org';
writeFileSync(resolve(__dirname, "../../package.json"), JSON.stringify(packageJSON, null, 2));
execSync('git add dist/');
execSync('git add package.json');
execSync(`git diff-index --quiet HEAD || git commit -am "auto upgrade version to ${packageJSON.version}"`);

4
lib/prepublish/prepublish.js

@ -22,4 +22,8 @@ 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));

9
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.0",
"version": "2.0.20200907174012",
"description": "fineui",
"main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts",
@ -60,8 +60,9 @@
"postbuild": "node ./lib/postbuild/postbuild.js",
"test": "karma start",
"dev": "npm run webpack:dev",
"prepublishOnly": "npm run build && node ./lib/prepublish/prepublish.js",
"postpublish": "cnpm sync fineui"
"prepublishToPrivate": "npm run build && node ./lib/prepublish/prepublish.js",
"publishToPrivate": "npm publish",
"postpublishToPrivate": " node ./lib/postpublish/postpublish.js"
},
"repository": {
"type": "git",
@ -77,4 +78,4 @@
},
"author": "fanruan",
"license": "MIT"
}
}

2
publish.bat

@ -1 +1 @@
npm publish
npm run publishToPrivate

2
publish.sh

@ -1 +1 @@
npm publish
npm run publishToPrivate
Loading…
Cancel
Save