Browse Source

chore: remove useless scripts (#38622)

pull/38633/head
afc163 2 years ago
committed by GitHub
parent
commit
7ec5ee2a58
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintignore
  2. 3
      .prettierignore
  3. 8
      .stylelintrc.json
  4. 13
      scripts/compact-vars.js
  5. 19
      scripts/dark-vars.js
  6. 20
      scripts/default-vars.js

1
.eslintignore

@ -10,6 +10,7 @@ es/**/*
lib/**/*
locale
server
.dumi/tmp
node_modules
_site
dist

3
.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

8
.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"]
}
}

13
scripts/compact-vars.js

@ -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;

19
scripts/dark-vars.js

@ -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;

20
scripts/default-vars.js

@ -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;
Loading…
Cancel
Save