项目作者: frocher

项目描述 :
Range datepicker webcomponent
高级语言: TypeScript
项目地址: git://github.com/frocher/wc-range-datepicker.git
创建时间: 2020-05-16T22:22:06Z
项目社区:https://github.com/frocher/wc-range-datepicker

开源协议:MIT License

下载


\

This webcomponent follows the open-wc recommendation.

Examples and documentation can be found here : https://wc-range-datepicker.netlify.app/

Installation

  1. npm i wc-range-datepicker

Usage

  1. <script type="module">
  2. import 'wc-range-datepicker/wc-range-datepicker.js';
  3. </script>
  4. <wc-range-datepicker></wc-range-datepicker>

Linting with ESLint, Prettier, and Types

To scan the project for linting errors, run

  1. npm run lint

You can lint with ESLint and Prettier individually as well

  1. npm run lint:eslint
  1. npm run lint:prettier

To automatically fix many linting errors, run

  1. npm run format

You can format using ESLint and Prettier individually as well

  1. npm run format:eslint
  1. npm run format:prettier

Testing with Karma

To run the suite of karma tests, run

  1. npm run test

To run the tests in watch mode (for TDD, for example), run

  1. npm run test:watch

Demoing with Storybook

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

  1. npm run storybook

To build a production version of Storybook, run

  1. npm run storybook:build

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

  1. npm start

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