Skip to content

kaodim/KaoDTPicker

Repository files navigation

Gatsby


<ORG_NAME> jest Storybook

Kaodim's custom React date and time picker library

Getting Started

First, clone this project:

$ git clone https://github.com/kaodim/KaoDTPicker.git
$ cd KaoDTPicker

Then install dependencies by using specific node version:

$ nvm use
$ npm install # `yarn install` if using yarn

If everything works fine, you can use npm run storybook for development.

Run Scripts Description

The following are the descriptions of npm run <script>

npm run <script> Description
storybook Run Storybook at localhost:6006 for development
build Build the library and generate dist folder
prebuild Remove dist folder
test Run unit tests with Jest
lint Lint files in /src
build-storybook Build Storybook as a static web application (Not using at the moment)

Application Structure

.
├── .circleci                   # CircleCI scripts folder
├── .storybook                  # Storybook config folder
├── dist                        # Library main folder
│   └── index.js                # Library index file
├── src                         # Application source code
│   ├── index.js                # Kao-DTPicker main file
│   ├── components              # All React components folder
│   ├── constants               # Mock data constants
│   ├── modules                 # Re-usable modules
│   ├── styles                  # Application styles folder
│   │   ├── base                # Global base styles
│   │   └── components          # Component base styles
│   ├── svg                     # SVG assets
│   └── tests                   # Testing related folder
│       ├── components          # Component unit tests
│       │   └── __snapshots__   # Snapshots folder
│       ├── fixtures            # Mock constants for testing
│       ├── __mocks__           # Dependencies library mocks 
│       └── setupTests.js       # Jest unit test setting file
└── stories                     # Stories for Storybook

Wikis

Read more on wiki