ant-design / antd-token-previewer Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://ant-design.github.io/antd-token-previewer
License: MIT License
Home Page: https://ant-design.github.io/antd-token-previewer
License: MIT License
Currently [email protected]
has been released for a while, from a simple component to a complex one with a lot of demos within, which make this component too large with nearly 400kb after gzip.
And for other reasons like package name: #181 , it is needed to split this repo and make theme-editor dependent.
@ant-design/theme-editor
@ant-design/token-previewer
and possible demo package.Suspense
and React.lazy
to split demos after bundled.The theme editor works great, but maintaining a theme can become hard for people who want more control over the components.
Imagine the following case:
I propose to add a section to define custom variables. When defined, variables will be then converted to CSS custom properties and could be used to define the value of a property in the theme.
npm i
throw an error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! dev react@"^18.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.14.0" from [email protected]
npm ERR! node_modules/react-test-renderer
npm ERR! dev react-test-renderer@"^16.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/bytedance/.npm/_logs/2023-08-17T09_38_37_836Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: /Users/bytedance/.npm/_logs/2023-08-17T09_38_37_836Z-debug-0.log
fix with
npm i --force
npm run start
> [email protected] start
> dumi dev
Starting the development server...
● Webpack █████████████████████████ building (10%) 1/2 modules 1 active
babel-loader › src/.umi/umi.ts
node:internal/crypto/hash:69
this[kHandle] = new _Hash(algorithm, xofLen);
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:69:19)
at Object.createHash (node:crypto:133:10)
at module.exports.__webpack_modules__.57442.module.exports (/Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:135907:62)
at NormalModule._initBuildHash (/Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109317:16)
at /Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109352:10
at /Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:109223:13
at /Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61151:11
at /Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:61017:18
at context.callback (/Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:60895:13)
at /Users/bytedance/dev/antd/antd-token-previewer/node_modules/@umijs/deps/compiled/babel-loader/index.js:1:130029 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v18.17.0
➜ antd-token-previewer git:(fix/shadow-error) ✗
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.