|
|
@ -1,19 +1,16 @@ |
|
|
|
const { sync, uniq } = require("./utils"); |
|
|
|
const { sync, uniq } = require("./utils"); |
|
|
|
|
|
|
|
|
|
|
|
const fixJs = "./dist/fix/fix.js"; |
|
|
|
const fixJs = "./dist/fix/fix.js"; |
|
|
|
const fixProxyJs = './dist/fix/fix.proxy.js'; |
|
|
|
const fixProxyJs = "./dist/fix/fix.proxy.js"; |
|
|
|
const fixCompact = "./dist/fix/fix.compact.js"; |
|
|
|
const fixCompact = "./dist/fix/fix.compact.js"; |
|
|
|
const workerCompact = './dist/fix/worker.compact.js'; |
|
|
|
const workerCompact = "./dist/fix/worker.compact.js"; |
|
|
|
const lodashJs = "src/core/1.lodash.js"; |
|
|
|
const lodashJs = "src/core/1.lodash.js"; |
|
|
|
const jqueryJs = "src/core/platform/web/jquery/_jquery.js"; |
|
|
|
const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js"; |
|
|
|
|
|
|
|
|
|
|
|
const runtimePolyfill = ["core-js/stable"]; |
|
|
|
const runtimePolyfill = []; |
|
|
|
|
|
|
|
|
|
|
|
const basicAttachmentMap = { |
|
|
|
const basicAttachmentMap = { |
|
|
|
polyfill: sync([ |
|
|
|
polyfill: sync(["src/core/0.foundation.js", "src/polyfill/**/*.js"]).concat(runtimePolyfill), |
|
|
|
"src/core/0.foundation.js", |
|
|
|
|
|
|
|
"src/polyfill/**/*.js", |
|
|
|
|
|
|
|
]).concat(runtimePolyfill), |
|
|
|
|
|
|
|
core: sync([ |
|
|
|
core: sync([ |
|
|
|
"src/less/core/**/*.less", |
|
|
|
"src/less/core/**/*.less", |
|
|
|
"src/less/theme/**/*.less", |
|
|
|
"src/less/theme/**/*.less", |
|
|
@ -39,38 +36,23 @@ const basicAttachmentMap = { |
|
|
|
// "src/widget/**/*.js",
|
|
|
|
// "src/widget/**/*.js",
|
|
|
|
// "src/component/**/*.js",
|
|
|
|
// "src/component/**/*.js",
|
|
|
|
]), |
|
|
|
]), |
|
|
|
router: sync([ |
|
|
|
router: sync(["src/router/**/*.js"]), |
|
|
|
"src/router/**/*.js", |
|
|
|
core_without_platform: sync( |
|
|
|
]), |
|
|
|
["src/core/0.foundation.js", lodashJs, "src/core/**/*.js", "src/data/**/*.js"], |
|
|
|
core_without_platform: sync([ |
|
|
|
["src/core/platform/**/*.js", "src/core/controller/**/*.js"] |
|
|
|
"src/core/0.foundation.js", |
|
|
|
), |
|
|
|
lodashJs, |
|
|
|
|
|
|
|
"src/core/**/*.js", |
|
|
|
|
|
|
|
"src/data/**/*.js", |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
"src/core/platform/**/*.js", |
|
|
|
|
|
|
|
"src/core/controller/**/*.js", |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
core_without_normalize: sync( |
|
|
|
core_without_normalize: sync( |
|
|
|
["src/less/core/**/*.less", "src/less/theme/**/*.less"], ["src/less/core/normalize.less", "src/less/core/normalize2.less"] |
|
|
|
["src/less/core/**/*.less", "src/less/theme/**/*.less"], |
|
|
|
|
|
|
|
["src/less/core/normalize.less", "src/less/core/normalize2.less"] |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
core_without_conflict: sync( |
|
|
|
|
|
|
|
["src/less/core/**/*.less", "src/less/theme/**/*.less", lodashJs, "src/core/**/*.js", "src/data/**/*.js"], |
|
|
|
|
|
|
|
["src/core/conflict.js"] |
|
|
|
), |
|
|
|
), |
|
|
|
core_without_conflict: sync([ |
|
|
|
|
|
|
|
"src/less/core/**/*.less", |
|
|
|
|
|
|
|
"src/less/theme/**/*.less", |
|
|
|
|
|
|
|
lodashJs, |
|
|
|
|
|
|
|
"src/core/**/*.js", |
|
|
|
|
|
|
|
"src/data/**/*.js", |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
"src/core/conflict.js", |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
resource: sync(["src/less/resource/**/*.less"]), |
|
|
|
resource: sync(["src/less/resource/**/*.less"]), |
|
|
|
font: sync(["public/less/font.less"]), |
|
|
|
font: sync(["public/less/font.less"]), |
|
|
|
ts: ['./typescript/bundle.ts'], |
|
|
|
ts: ["./typescript/bundle.ts"], |
|
|
|
ui: sync([ |
|
|
|
ui: sync(["ui/less/app.less", "ui/less/**/*.less", "ui/js/**/*.js"]), |
|
|
|
'ui/less/app.less', |
|
|
|
|
|
|
|
'ui/less/**/*.less', |
|
|
|
|
|
|
|
'ui/js/**/*.js', |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
config: sync(["demo/version.js", "i18n/i18n.cn.js"]), |
|
|
|
config: sync(["demo/version.js", "i18n/i18n.cn.js"]), |
|
|
|
utils: sync([ |
|
|
|
utils: sync([ |
|
|
|
"src/core/0.foundation.js", |
|
|
|
"src/core/0.foundation.js", |
|
|
@ -95,7 +77,7 @@ const basicAttachmentMap = { |
|
|
|
"src/less/widget/**/*.less", |
|
|
|
"src/less/widget/**/*.less", |
|
|
|
"src/less/component/**/*.less", |
|
|
|
"src/less/component/**/*.less", |
|
|
|
]), |
|
|
|
]), |
|
|
|
js_bundle: sync(["src/bundle.js"]) |
|
|
|
js_bundle: sync(["src/bundle.js"]), |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const bundle = [].concat( |
|
|
|
const bundle = [].concat( |
|
|
@ -109,13 +91,10 @@ const bundle = [].concat( |
|
|
|
[fixCompact, workerCompact], |
|
|
|
[fixCompact, workerCompact], |
|
|
|
basicAttachmentMap.router, |
|
|
|
basicAttachmentMap.router, |
|
|
|
sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]), |
|
|
|
sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]), |
|
|
|
basicAttachmentMap.ts, |
|
|
|
basicAttachmentMap.ts |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const bundleCss = [].concat( |
|
|
|
const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"])); |
|
|
|
basicAttachmentMap.less, |
|
|
|
|
|
|
|
sync(["public/less/app.less", "public/less/**/*.less"]), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const bundleModern = [].concat(
|
|
|
|
// const bundleModern = [].concat(
|
|
|
|
// sync(["src/less/modern.less"]),
|
|
|
|
// sync(["src/less/modern.less"]),
|
|
|
@ -129,9 +108,9 @@ const coreJs = [].concat( |
|
|
|
basicAttachmentMap.base, |
|
|
|
basicAttachmentMap.base, |
|
|
|
basicAttachmentMap.case, |
|
|
|
basicAttachmentMap.case, |
|
|
|
basicAttachmentMap.widget, |
|
|
|
basicAttachmentMap.widget, |
|
|
|
['./dist/fix/fix.compact.js'], |
|
|
|
["./dist/fix/fix.compact.js"], |
|
|
|
basicAttachmentMap.router, |
|
|
|
basicAttachmentMap.router, |
|
|
|
basicAttachmentMap.ts, |
|
|
|
basicAttachmentMap.ts |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const resource = sync(["private/less/app.less", "private/less/**/*.less"]); |
|
|
|
const resource = sync(["private/less/app.less", "private/less/**/*.less"]); |
|
|
@ -140,16 +119,17 @@ const config = sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js |
|
|
|
|
|
|
|
|
|
|
|
const bundleWithoutNormalize = [].concat( |
|
|
|
const bundleWithoutNormalize = [].concat( |
|
|
|
basicAttachmentMap.core_without_normalize, |
|
|
|
basicAttachmentMap.core_without_normalize, |
|
|
|
sync([ |
|
|
|
sync( |
|
|
|
"src/less/base/**/*.less", |
|
|
|
[ |
|
|
|
"src/less/case/**/*.less", |
|
|
|
"src/less/base/**/*.less", |
|
|
|
"src/less/widget/**/*.less", |
|
|
|
"src/less/case/**/*.less", |
|
|
|
"src/less/component/**/*.less", |
|
|
|
"src/less/widget/**/*.less", |
|
|
|
"public/less/**/*.less", |
|
|
|
"src/less/component/**/*.less", |
|
|
|
// ts的less
|
|
|
|
"public/less/**/*.less", |
|
|
|
], [ |
|
|
|
// ts的less
|
|
|
|
"public/less/app.less", |
|
|
|
], |
|
|
|
]), |
|
|
|
["public/less/app.less"] |
|
|
|
|
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const fineuiWithoutNormalize = [].concat( |
|
|
|
const fineuiWithoutNormalize = [].concat( |
|
|
@ -159,20 +139,27 @@ const fineuiWithoutNormalize = [].concat( |
|
|
|
"src/less/case/**/*.less", |
|
|
|
"src/less/case/**/*.less", |
|
|
|
"src/less/widget/**/*.less", |
|
|
|
"src/less/widget/**/*.less", |
|
|
|
"src/less/component/**/*.less", |
|
|
|
"src/less/component/**/*.less", |
|
|
|
'ui/less/app.less', |
|
|
|
"ui/less/app.less", |
|
|
|
'ui/less/**/*.less', |
|
|
|
"ui/less/**/*.less", |
|
|
|
]), |
|
|
|
]) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const fineui = [].concat( |
|
|
|
const fineui = [].concat( |
|
|
|
bundleCss, |
|
|
|
bundleCss, |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
basicAttachmentMap.js_bundle, |
|
|
|
basicAttachmentMap.js_bundle, |
|
|
|
basicAttachmentMap.ui, |
|
|
|
basicAttachmentMap.ui, |
|
|
|
basicAttachmentMap.ts, |
|
|
|
basicAttachmentMap.ts |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fineuiForWorker = [].concat( |
|
|
|
|
|
|
|
jqueryPolyfill, |
|
|
|
|
|
|
|
basicAttachmentMap.js_bundle, |
|
|
|
|
|
|
|
basicAttachmentMap.ui, |
|
|
|
|
|
|
|
basicAttachmentMap.ts |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const fineuiWithoutConflict = [].concat( |
|
|
|
const fineuiWithoutConflict = [].concat( |
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
|
|
|
|
basicAttachmentMap.core_without_conflict, |
|
|
|
basicAttachmentMap.core_without_conflict, |
|
|
|
basicAttachmentMap.fix, |
|
|
|
basicAttachmentMap.fix, |
|
|
|
basicAttachmentMap.base, |
|
|
|
basicAttachmentMap.base, |
|
|
@ -182,6 +169,7 @@ const fineuiWithoutConflict = [].concat( |
|
|
|
[fixCompact, workerCompact], |
|
|
|
[fixCompact, workerCompact], |
|
|
|
basicAttachmentMap.ui, |
|
|
|
basicAttachmentMap.ui, |
|
|
|
basicAttachmentMap.ts, |
|
|
|
basicAttachmentMap.ts, |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// const fineuiModern = [].concat(
|
|
|
|
// const fineuiModern = [].concat(
|
|
|
@ -202,30 +190,7 @@ const fineuiProxy = [].concat( |
|
|
|
basicAttachmentMap.router, |
|
|
|
basicAttachmentMap.router, |
|
|
|
[fixCompact, workerCompact], |
|
|
|
[fixCompact, workerCompact], |
|
|
|
basicAttachmentMap.ui, |
|
|
|
basicAttachmentMap.ui, |
|
|
|
basicAttachmentMap.ts, |
|
|
|
basicAttachmentMap.ts |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fineuiWithoutJqueryAndPolyfillJs = [].concat( |
|
|
|
|
|
|
|
runtimePolyfill, |
|
|
|
|
|
|
|
sync([ |
|
|
|
|
|
|
|
"src/core/0.foundation.js", |
|
|
|
|
|
|
|
lodashJs, |
|
|
|
|
|
|
|
"src/core/**/*.js", |
|
|
|
|
|
|
|
"src/data/**/*.js", |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
"src/core/platform/web/**/*.js", |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
basicAttachmentMap.fix, |
|
|
|
|
|
|
|
sync([ |
|
|
|
|
|
|
|
"src/base/**/*.js", |
|
|
|
|
|
|
|
"src/case/**/*.js", |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
"src/base/single/input/file.js", |
|
|
|
|
|
|
|
"src/case/ztree/**/*.js", |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
basicAttachmentMap.widget, |
|
|
|
|
|
|
|
sync([fixCompact, workerCompact, "ui/js/**/*.js"]), |
|
|
|
|
|
|
|
basicAttachmentMap.ts, |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const demo = [].concat( |
|
|
|
const demo = [].concat( |
|
|
@ -240,7 +205,7 @@ const demo = [].concat( |
|
|
|
sync(["public/less/app.less", "public/less/**/*.less"]), |
|
|
|
sync(["public/less/app.less", "public/less/**/*.less"]), |
|
|
|
[fixCompact, workerCompact], |
|
|
|
[fixCompact, workerCompact], |
|
|
|
basicAttachmentMap.ts, |
|
|
|
basicAttachmentMap.ts, |
|
|
|
sync(["demo/less/*.less", "demo/less/**/*.less", "demo/app.js", "demo/js/**/*.js", "demo/config.js"]), |
|
|
|
sync(["demo/less/*.less", "demo/less/**/*.less", "demo/app.js", "demo/js/**/*.js", "demo/config.js"]) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
@ -254,12 +219,12 @@ module.exports = { |
|
|
|
bundleWithoutNormalize: uniq(bundleWithoutNormalize), |
|
|
|
bundleWithoutNormalize: uniq(bundleWithoutNormalize), |
|
|
|
fineui: uniq(fineui), |
|
|
|
fineui: uniq(fineui), |
|
|
|
fineuiProxy: uniq(fineuiProxy), |
|
|
|
fineuiProxy: uniq(fineuiProxy), |
|
|
|
fineuiWithoutJqueryAndPolyfillJs: uniq(fineuiWithoutJqueryAndPolyfillJs), |
|
|
|
fineuiForWorker: uniq(fineuiForWorker), |
|
|
|
utils: uniq(basicAttachmentMap.utils), |
|
|
|
utils: uniq(basicAttachmentMap.utils), |
|
|
|
demo: uniq(demo), |
|
|
|
demo: uniq(demo), |
|
|
|
coreWithoutPlatform: uniq(basicAttachmentMap.core_without_platform), |
|
|
|
coreWithoutPlatform: uniq(basicAttachmentMap.core_without_platform), |
|
|
|
coreJs: uniq(coreJs), |
|
|
|
coreJs: uniq(coreJs), |
|
|
|
resource: uniq((resource)), |
|
|
|
resource: uniq(resource), |
|
|
|
config: uniq(config), |
|
|
|
config: uniq(config), |
|
|
|
bundleCss: uniq(bundleCss), |
|
|
|
bundleCss: uniq(bundleCss), |
|
|
|
}; |
|
|
|
}; |
|
|
|