@accordion/accordion-graph 中文文档教程
\
此 Web 组件遵循 open-wc 推荐。
Installation
npm i accordion-graph
Usage
<script type="module">
import 'accordion-graph/accordion-graph.js';
</script>
<accordion-graph></accordion-graph>
Linting with ESLint, Prettier, and Types
要扫描项目中的 linting 错误,请运行
npm run lint
您也可以单独使用 ESLint 和 Prettier 进行 lint
npm run lint:eslint
npm run lint:prettier
要自动修复许多 linting 错误,请运行
npm run format
您也可以单独使用 ESLint 和 Prettier 进行格式化
npm run format:eslint
npm run format:prettier
Tooling configs
对于大多数工具,配置在 package.json
以减少项目中的文件量。
如果你自定义配置很多,你可以考虑将它们移动到单独的文件中。
Local Demo with es-dev-server
npm start
运行本地开发服务器,为位于 demo/index.html
中的基本演示提供服务
\
This webcomponent follows the open-wc recommendation.
Installation
npm i accordion-graph
Usage
<script type="module">
import 'accordion-graph/accordion-graph.js';
</script>
<accordion-graph></accordion-graph>
Linting with ESLint, Prettier, and Types
To scan the project for linting errors, run
npm run lint
You can lint with ESLint and Prettier individually as well
npm run lint:eslint
npm run lint:prettier
To automatically fix many linting errors, run
npm run format
You can format using ESLint and Prettier individually as well
npm run format:eslint
npm run format:prettier
Tooling configs
For most of the tools, the configuration is in the package.json
to reduce the amount of files in your project.
If you customize the configuration a lot, you can consider moving them to individual files.
Local Demo with es-dev-server
npm start
To run a local development server that serves the basic demo located in demo/index.html