Browse Source

Pull request #2425: 无JIRA任务 加打bi和jsy覆盖less的css的脚本

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '8d003b04989bce0d2d9e86a70d45895240b03951':
  格式
  脚本改下
  name change
  无JIRA任务 加打bi和jsy覆盖less的css的脚本
es6
windy 3 years ago
parent
commit
f0882486e5
  1. 20
      bi.lessconfig.json
  2. 13
      jsy.lessconfig.json
  3. 7
      package.json
  4. 13
      webpack/attachments.js
  5. 20
      webpack/webpack.css.js

20
bi.lessconfig.json

@ -0,0 +1,20 @@
{
"@color-primary": "#2C60DB",
"@color-bi-green-100": "#3FC47B",
"@color-bi-light-blue-100": "#19B8EA",
"@color-bi-orange-100": "#FAAA39",
"@color-bi-red-100": "#E65251",
"@color-bi-black": "#000A19",
"@color-bi-light-gray": "#ECEEF3",
"@color-bi-light-gray-theme-dark": "#292F45",
"@color-bi-dim-gray": "#2E3A4D",
"@border-color-disabled": "#E7E8EB",
"@color-bi-sliver-theme-dark": "363E55",
"@color-bi-background-active-radio": "transparent",
"@color-bi-background-active-radio-content": "#2C60DB",
"@color-bi-background-disabled-active-radio-content": "#D0D4DA",
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#D0D4DA",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479"
}

13
jsy.lessconfig.json

@ -0,0 +1,13 @@
{
"@font-color-normal": "#031b4e",
"@font-color-highlight": "#305bd3",
"@font-color-light-gray": "#0d1540",
"@font-color-disabled": "fade(#031b4e, 40)",
"@font-color-light-disabled": "fade(#0d1540, 20)",
"@background-color-highlight": "#305bd3",
"@background-color-light-disabled": "fade(#0d1540, 5)",
"@border-color-highlight": "#305bd3",
"@border-color-disabled": "#e8eaed"
}

7
package.json

@ -54,7 +54,8 @@
},
"scripts": {
"webpack:dev": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js -p --progress --host 0.0.0.0 --config=webpack/webpack.dev.js --mode development",
"webpack:prod": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack -p --progress --config=webpack/webpack.prod.js --mode production",
"webpack:prod": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack -p --progress --config=webpack/webpack.prod.js --mode production && npm run biCss && npm run jsyCss",
"webpack:css": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack -p --progress --config=webpack/webpack.css.js --mode production",
"start": "node server.js",
"build": "npm run webpack:prod && tsc",
"postbuild": "node ./lib/postbuild/postbuild.js",
@ -62,7 +63,9 @@
"dev": "npm run webpack:dev",
"prepublishToPrivate": "npm run build && node ./lib/prepublish/prepublish.js",
"publishToPrivate": "npm publish",
"postpublishToPrivate": " node ./lib/postpublish/postpublish.js"
"postpublishToPrivate": " node ./lib/postpublish/postpublish.js",
"biCss": "cross-env LESS_CONFIG_PATH=bi.lessconfig.json LESS_FILE_NAME=bi npm run webpack:css",
"jsyCss": "cross-env LESS_CONFIG_PATH=jsy.lessconfig.json LESS_FILE_NAME=jsy npm run webpack:css"
},
"repository": {
"type": "git",

13
webpack/attachments.js

@ -77,6 +77,13 @@ const basicAttachmentMap = {
]),
fix: [fixJs],
fixProxy: [fixProxyJs],
less: sync([
"src/less/core/**/*.less",
"src/less/theme/**/*.less",
"src/less/base/**/*.less",
"src/less/widget/**/*.less",
"src/less/component/**/*.less",
]),
};
const bundle = [].concat(
@ -93,6 +100,11 @@ const bundle = [].concat(
basicAttachmentMap.ts,
);
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"]),
@ -226,4 +238,5 @@ module.exports = {
coreJs: uniq(coreJs),
resource: uniq((resource)),
config: uniq(config),
bundleCss: uniq(bundleCss),
};

20
webpack/webpack.css.js

@ -0,0 +1,20 @@
const merge = require("webpack-merge");
const dirs = require("./dirs");
const common = require("./webpack.prod.js");
common.entry = {};
const attachments = require("./attachments");
module.exports = merge.smart(common, {
mode: "production",
entry: {
[`2.0/${process.env.LESS_FILE_NAME}.min`]: attachments.bundleCss,
},
output: {
path: dirs.DEST,
filename: "[name].js",
},
});
Loading…
Cancel
Save