|
|
@ -1,70 +1,16 @@ |
|
|
|
const { sync, uniq } = require("./utils"); |
|
|
|
const { sync, uniq } = require("./utils"); |
|
|
|
|
|
|
|
|
|
|
|
const workerCompact = "./dist/fix/worker.compact.js"; |
|
|
|
|
|
|
|
const lodashJs = "src/core/1.lodash.js"; |
|
|
|
|
|
|
|
const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js"; |
|
|
|
const jqueryPolyfill = "./src/core/platform/web/jquery/jquery.polyfill.js"; |
|
|
|
const configJS = "./src/core/platform/web/config.js"; |
|
|
|
const configJS = "./src/core/platform/web/config.js"; |
|
|
|
|
|
|
|
|
|
|
|
const runtimePolyfill = []; |
|
|
|
const runtimePolyfill = ["core-js/stable"]; |
|
|
|
|
|
|
|
|
|
|
|
const basicAttachmentMap = { |
|
|
|
const basicAttachmentMap = { |
|
|
|
polyfill: sync(["src/core/0.foundation.js", "src/polyfill/**/*.js"]).concat(runtimePolyfill), |
|
|
|
polyfill: sync(["src/polyfill/**/*.js"]).concat(runtimePolyfill), |
|
|
|
core: sync([ |
|
|
|
|
|
|
|
"src/less/core/**/*.less", |
|
|
|
|
|
|
|
"src/less/theme/**/*.less" |
|
|
|
|
|
|
|
// lodashJs,
|
|
|
|
|
|
|
|
// jqueryJs,
|
|
|
|
|
|
|
|
// "src/core/**/*.js",
|
|
|
|
|
|
|
|
// "src/data/**/*.js",
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
// 最基础的控件
|
|
|
|
|
|
|
|
base: sync([ |
|
|
|
|
|
|
|
"src/less/base/**/*.less" |
|
|
|
|
|
|
|
// "src/third/**/*.js",
|
|
|
|
|
|
|
|
// "src/base/**/*.js",
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
// 实现好的一些基础实例
|
|
|
|
|
|
|
|
case: sync([ |
|
|
|
|
|
|
|
// "src/case/**/*.js",
|
|
|
|
|
|
|
|
"src/less/case/**/*.less" |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
widget: sync([ |
|
|
|
|
|
|
|
"src/less/widget/**/*.less", |
|
|
|
|
|
|
|
"src/less/component/**/*.less" |
|
|
|
|
|
|
|
// "src/widget/**/*.js",
|
|
|
|
|
|
|
|
// "src/component/**/*.js",
|
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
router: sync(["src/router/**/*.js"]), |
|
|
|
|
|
|
|
core_without_platform: sync( |
|
|
|
|
|
|
|
["src/core/0.foundation.js", lodashJs, "src/core/**/*.js", "src/data/**/*.js"], |
|
|
|
|
|
|
|
["src/core/platform/**/*.js", "src/core/controller/**/*.js"] |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
core_without_normalize: sync( |
|
|
|
|
|
|
|
["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"] |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
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/less/app.less", "ui/less/**/*.less", "ui/js/**/*.js"]), |
|
|
|
ui: sync(["ui/less/app.less", "ui/less/**/*.less", "ui/js/**/*.js"]), |
|
|
|
config: sync(["demo/version.js", "i18n/i18n.cn.js"]), |
|
|
|
|
|
|
|
utils: sync([ |
|
|
|
|
|
|
|
"src/core/0.foundation.js", |
|
|
|
|
|
|
|
lodashJs, |
|
|
|
|
|
|
|
"src/core/constant/**/*.js", |
|
|
|
|
|
|
|
"src/core/func/**/*.js", |
|
|
|
|
|
|
|
"src/core/2.base.js", |
|
|
|
|
|
|
|
"src/core/3.ob.js", |
|
|
|
|
|
|
|
"src/core/5.inject.js", |
|
|
|
|
|
|
|
"src/core/utils/*.js", |
|
|
|
|
|
|
|
"i18n/i18n.cn.js", |
|
|
|
|
|
|
|
"_mobile/date.i18n.cn.js", |
|
|
|
|
|
|
|
"src/data/**/*.js" |
|
|
|
|
|
|
|
]), |
|
|
|
|
|
|
|
less: sync([ |
|
|
|
less: sync([ |
|
|
|
"src/less/core/**/*.less", |
|
|
|
"src/less/core/**/*.less", |
|
|
|
"src/less/theme/**/*.less", |
|
|
|
"src/less/theme/**/*.less", |
|
|
@ -76,69 +22,8 @@ const basicAttachmentMap = { |
|
|
|
js_bundle: sync(["src/bundle.js"]) |
|
|
|
js_bundle: sync(["src/bundle.js"]) |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const bundle = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
|
|
|
|
basicAttachmentMap.core, |
|
|
|
|
|
|
|
basicAttachmentMap.fix, |
|
|
|
|
|
|
|
basicAttachmentMap.base, |
|
|
|
|
|
|
|
basicAttachmentMap.case, |
|
|
|
|
|
|
|
basicAttachmentMap.widget, |
|
|
|
|
|
|
|
sync(["public/less/app.less", "public/less/**/*.less"]), |
|
|
|
|
|
|
|
[workerCompact], |
|
|
|
|
|
|
|
basicAttachmentMap.router, |
|
|
|
|
|
|
|
sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]), |
|
|
|
|
|
|
|
basicAttachmentMap.ts |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"])); |
|
|
|
const bundleCss = [].concat(basicAttachmentMap.less, sync(["public/less/app.less", "public/less/**/*.less"])); |
|
|
|
|
|
|
|
|
|
|
|
// const bundleModern = [].concat(
|
|
|
|
|
|
|
|
// sync(["src/less/modern.less"]),
|
|
|
|
|
|
|
|
// sync(["public/modern/app.less", "public/modern/**/*.less"]),
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const coreJs = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
|
|
|
|
basicAttachmentMap.core, |
|
|
|
|
|
|
|
basicAttachmentMap.fix, |
|
|
|
|
|
|
|
basicAttachmentMap.base, |
|
|
|
|
|
|
|
basicAttachmentMap.case, |
|
|
|
|
|
|
|
basicAttachmentMap.widget, |
|
|
|
|
|
|
|
basicAttachmentMap.router, |
|
|
|
|
|
|
|
basicAttachmentMap.ts |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const resource = sync(["private/less/app.less", "private/less/**/*.less"]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const config = sync(["public/js/**/*.js", "public/js/index.js", "i18n/i18n.cn.js"]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const bundleWithoutNormalize = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.core_without_normalize, |
|
|
|
|
|
|
|
sync( |
|
|
|
|
|
|
|
[ |
|
|
|
|
|
|
|
"src/less/base/**/*.less", |
|
|
|
|
|
|
|
"src/less/case/**/*.less", |
|
|
|
|
|
|
|
"src/less/widget/**/*.less", |
|
|
|
|
|
|
|
"src/less/component/**/*.less", |
|
|
|
|
|
|
|
"public/less/**/*.less" |
|
|
|
|
|
|
|
// ts的less
|
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
["public/less/app.less"] |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fineuiWithoutNormalize = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.core_without_normalize, |
|
|
|
|
|
|
|
sync([ |
|
|
|
|
|
|
|
"src/less/base/**/*.less", |
|
|
|
|
|
|
|
"src/less/case/**/*.less", |
|
|
|
|
|
|
|
"src/less/widget/**/*.less", |
|
|
|
|
|
|
|
"src/less/component/**/*.less", |
|
|
|
|
|
|
|
"ui/less/app.less", |
|
|
|
|
|
|
|
"ui/less/**/*.less" |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fineui = [].concat( |
|
|
|
const fineui = [].concat( |
|
|
|
bundleCss, |
|
|
|
bundleCss, |
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
basicAttachmentMap.polyfill, |
|
|
@ -155,70 +40,7 @@ const fineuiForWorker = [].concat( |
|
|
|
basicAttachmentMap.ts |
|
|
|
basicAttachmentMap.ts |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const fineuiWithoutConflict = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.core_without_conflict, |
|
|
|
|
|
|
|
basicAttachmentMap.fix, |
|
|
|
|
|
|
|
basicAttachmentMap.base, |
|
|
|
|
|
|
|
basicAttachmentMap.case, |
|
|
|
|
|
|
|
basicAttachmentMap.widget, |
|
|
|
|
|
|
|
basicAttachmentMap.router, |
|
|
|
|
|
|
|
[workerCompact], |
|
|
|
|
|
|
|
basicAttachmentMap.ui, |
|
|
|
|
|
|
|
basicAttachmentMap.ts, |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const fineuiModern = [].concat(
|
|
|
|
|
|
|
|
// sync(["src/less/modern.less"]),
|
|
|
|
|
|
|
|
// sync([
|
|
|
|
|
|
|
|
// 'ui/modern/app.less',
|
|
|
|
|
|
|
|
// 'ui/modern/**/*.less',
|
|
|
|
|
|
|
|
// ]),
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const fineuiProxy = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
|
|
|
|
basicAttachmentMap.core, |
|
|
|
|
|
|
|
basicAttachmentMap.fixProxy, |
|
|
|
|
|
|
|
basicAttachmentMap.base, |
|
|
|
|
|
|
|
basicAttachmentMap.case, |
|
|
|
|
|
|
|
basicAttachmentMap.widget, |
|
|
|
|
|
|
|
basicAttachmentMap.router, |
|
|
|
|
|
|
|
[workerCompact], |
|
|
|
|
|
|
|
basicAttachmentMap.ui, |
|
|
|
|
|
|
|
basicAttachmentMap.ts |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const demo = [].concat( |
|
|
|
|
|
|
|
basicAttachmentMap.polyfill, |
|
|
|
|
|
|
|
basicAttachmentMap.core, |
|
|
|
|
|
|
|
basicAttachmentMap.fix, |
|
|
|
|
|
|
|
basicAttachmentMap.config, |
|
|
|
|
|
|
|
basicAttachmentMap.base, |
|
|
|
|
|
|
|
basicAttachmentMap.case, |
|
|
|
|
|
|
|
basicAttachmentMap.widget, |
|
|
|
|
|
|
|
basicAttachmentMap.router, |
|
|
|
|
|
|
|
sync(["public/less/app.less", "public/less/**/*.less"]), |
|
|
|
|
|
|
|
[workerCompact], |
|
|
|
|
|
|
|
basicAttachmentMap.ts, |
|
|
|
|
|
|
|
sync(["demo/less/*.less", "demo/less/**/*.less", "demo/app.js", "demo/js/**/*.js", "demo/config.js"]) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
lodash: lodashJs, |
|
|
|
|
|
|
|
font: basicAttachmentMap.font, |
|
|
|
|
|
|
|
bundle: uniq(bundle), |
|
|
|
|
|
|
|
fineuiWithoutNormalize: uniq(fineuiWithoutNormalize), |
|
|
|
|
|
|
|
fineuiWithoutConflict: uniq(fineuiWithoutConflict), |
|
|
|
|
|
|
|
bundleWithoutNormalize: uniq(bundleWithoutNormalize), |
|
|
|
|
|
|
|
fineui: uniq(fineui), |
|
|
|
fineui: uniq(fineui), |
|
|
|
fineuiProxy: uniq(fineuiProxy), |
|
|
|
fineuiForWorker: uniq(fineuiForWorker) |
|
|
|
fineuiForWorker: uniq(fineuiForWorker), |
|
|
|
|
|
|
|
utils: uniq(basicAttachmentMap.utils), |
|
|
|
|
|
|
|
demo: uniq(demo), |
|
|
|
|
|
|
|
coreWithoutPlatform: uniq(basicAttachmentMap.core_without_platform), |
|
|
|
|
|
|
|
coreJs: uniq(coreJs), |
|
|
|
|
|
|
|
resource: uniq(resource), |
|
|
|
|
|
|
|
config: uniq(config), |
|
|
|
|
|
|
|
bundleCss: uniq(bundleCss) |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|