From 7ec5ee2a5879dd653059e16f52a4f196775e299a Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 17 Nov 2022 16:41:05 +0800 Subject: [PATCH] chore: remove useless scripts (#38622) --- .eslintignore | 1 + .prettierignore | 3 ++- .stylelintrc.json | 8 +++----- scripts/compact-vars.js | 13 ------------- scripts/dark-vars.js | 19 ------------------- scripts/default-vars.js | 20 -------------------- 6 files changed, 6 insertions(+), 58 deletions(-) delete mode 100644 scripts/compact-vars.js delete mode 100644 scripts/dark-vars.js delete mode 100644 scripts/default-vars.js diff --git a/.eslintignore b/.eslintignore index c55492572d..eb06efd59b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,6 +10,7 @@ es/**/* lib/**/* locale server +.dumi/tmp node_modules _site dist diff --git a/.prettierignore b/.prettierignore index 9210b4ff3d..cfadc2c091 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,6 +11,8 @@ lib/ es/ dist/ _site/ +server +.dumi/tmp coverage/ CNAME LICENSE @@ -29,4 +31,3 @@ components/*/*.jsx .eslintignore .history **/*.yml -components/style/color/*.less diff --git a/.stylelintrc.json b/.stylelintrc.json index 81a0a2c283..4d48dbf970 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -7,7 +7,7 @@ "customSyntax": "postcss-less", "plugins": ["stylelint-declaration-block-no-ignored-properties"], "rules": { - "function-name-case": ["lower", { "ignoreFunctions": ["/colorPalette/"] }], + "function-name-case": ["lower"], "function-no-unknown": [ true, { @@ -23,8 +23,7 @@ "shade", "lighten", "percentage", - "-", - "~`colorPalette" + "-" ] } ], @@ -40,6 +39,5 @@ "selector-class-pattern": null, "selector-id-pattern": null, "selector-not-notation": null - }, - "ignoreFiles": ["components/style/color/{bezierEasing,colorPalette,tinyColor}.less"] + } } diff --git a/scripts/compact-vars.js b/scripts/compact-vars.js deleted file mode 100644 index 40093f9759..0000000000 --- a/scripts/compact-vars.js +++ /dev/null @@ -1,13 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const lessToJs = require('less-vars-to-js'); - -const stylePath = path.join(__dirname, '..', 'components', 'style'); -const compactLess = fs.readFileSync(path.join(stylePath, 'themes', 'compact.less'), 'utf8'); - -const compactPaletteLess = lessToJs(compactLess, { - stripPrefix: true, - resolveVariables: false, -}); - -module.exports = compactPaletteLess; diff --git a/scripts/dark-vars.js b/scripts/dark-vars.js deleted file mode 100644 index be8942abdc..0000000000 --- a/scripts/dark-vars.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Convert dark.less into js vars - * - * @example - * const darkVars = require('./dark-vars'); - */ -const fs = require('fs'); -const path = require('path'); -const lessToJs = require('less-vars-to-js'); - -const stylePath = path.join(__dirname, '..', 'components', 'style'); -const darkLess = fs.readFileSync(path.join(stylePath, 'themes', 'dark.less'), 'utf8'); - -const darkPaletteLess = lessToJs(darkLess, { - stripPrefix: true, - resolveVariables: false, -}); - -module.exports = darkPaletteLess; diff --git a/scripts/default-vars.js b/scripts/default-vars.js deleted file mode 100644 index 29b26dc76d..0000000000 --- a/scripts/default-vars.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Convert default.less into js vars - * - * @example - * const darkVars = require('./default-vars'); - */ -const fs = require('fs'); -const path = require('path'); -const lessToJs = require('less-vars-to-js'); - -const stylePath = path.join(__dirname, '..', 'components', 'style'); -const colorLess = fs.readFileSync(path.join(stylePath, 'color', 'colors.less'), 'utf8'); -const defaultLess = fs.readFileSync(path.join(stylePath, 'themes', 'default.less'), 'utf8'); - -const defaultPaletteLess = lessToJs(`${colorLess}${defaultLess}`, { - stripPrefix: true, - resolveVariables: false, -}); - -module.exports = defaultPaletteLess;