@3b4b/circle-button-ad 中文文档教程

发布于 3年前 浏览 27 更新于 3年前

\

此 Web 组件遵循 open-wc 推荐。

Installation

npm i @3b4b/circle-button-ad

Usage

<script type="module">
  import 'circle-button-ad/circle-button-ad.js';
</script>

<circle-button-ad></circle-button-ad>

Linting and formatting

要扫描项目的 linting 和格式错误,请运行

npm run lint

要自动修复 linting 和格式错误,请运行

npm run format

Testing with Web Test Runner

要执行单个测试运行:

npm run test

要在交互式观察模式下运行测试:

npm run test:watch

Demoing with Storybook

为您的组件运行 Storybook 的本地实例,请运行

npm run storybook

要 构建 Storybook 的生产版本,运行

npm run storybook:build

Tooling configs

对于大多数工具,配置位于 package.json 中,以最大限度地减少项目中的文件量。

如果你自定义配置很多,你可以考虑将它们移动到单独的文件中。

Local Demo with web-dev-server

npm start

运行本地开发服务器,为位于 demo/index.html 中的基本演示提供服务

\

This webcomponent follows the open-wc recommendation.

Installation

npm i @3b4b/circle-button-ad

Usage

<script type="module">
  import 'circle-button-ad/circle-button-ad.js';
</script>

<circle-button-ad></circle-button-ad>

Linting and formatting

To scan the project for linting and formatting errors, run

npm run lint

To automatically fix linting and formatting errors, run

npm run format

Testing with Web Test Runner

To execute a single test run:

npm run test

To run the tests in interactive watch mode run:

npm run test:watch

Demoing with Storybook

To run a local instance of Storybook for your component, run

npm run storybook

To build a production version of Storybook, run

npm run storybook:build

Tooling configs

For most of the tools, the configuration is in the package.json to minimize 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 web-dev-server

npm start

To run a local development server that serves the basic demo located in demo/index.html

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文