1.0.4-7 • Published 3 years ago

fcasb-ui v1.0.4-7

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
3 years ago

FCASB UI

React component library for faster and easier web development.

Table of Contents

1. Project Structure

├── .storybook
|   ├── main.js
├── coverage
├── dist
├── mocks
|   ├── styleMock.js
├── node_modules
├── scripts
|   ├── postBuild.js
├── src
│   ├── core
|   |   ├── <Stable Components>
|   |   |   ├── __tests__
|   |   |   ├── <components>.stories.tsx
|   |   |   ├── index.ts
|   |   |   ├── <components>.tsx
|   |   |   ├── styles.tsx
|   |   ├── index.ts
│   ├── labs
|   |   ├── <UnStable Components>
|   |   |   ├── __tests__
|   |   |   ├── <components>.stories.tsx
|   |   |   ├── index.ts
|   |   |   ├── <components>.tsx
|   |   |   ├── styles.tsx
|   |   ├── index.ts
|   ├── index.ts
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .prettierrc.js
├── jest.config.js
├── LICENSE
├── package.json
├── package.lock.json
├── README.md
├── rollup.config.js
├── tsconfig.json
├── yarn.lock

2. Available Scripts

ScriptDescription
devStart the development storybook server with hot module reloading.
formatFormat your code with Prettier
format:checkFormats only the changed code with Prettier.
cleanSafely remove files and folders on all platforms directories.
testRun your Jest tests once.
test:watchRun your Jest tests in watch mode.
test:coverageRun your Jest tests and check for code coverage.
lintLint both your code and style with ESLint.
lint:scriptLint only your code with ESLint.
lint:watchLint your code with ESLint in watch mode.
lint:styleLint your css with ESLint.
storybookStart the storybook server.
buildCompile your application and make it ready for deployment

3. Tech Stack

FCASB UI is built using the following:

  • Typescript
  • Rollup
  • Prettier
  • ESLint
  • StyleLint
  • Storybook
  • Husky
  • Material UI
  • Jest
  • React Testing Library

4. Adding a new component

  • add the new component directory in the src/core directory following this folder structure
├── MyComponent
|   ├── index.ts
|   ├── styles.ts
|   ├── MyComponent.tsx
|   ├── MyComponent.stories.tsx
|   ├── __tests__
|   |   ├── MyComponent.test.tsx

Once you have created your new component make sure you have exported it in the src/cpre/index.ts file. Doing so allows the component to be compiled into the final bundle using rollup.

// src/labs/index.ts
export * from './MyComponent';
export * from './SomeOtherComponent';

You can develope your new component using storybook as your playground. Once you have added the .stories.tsx file for you new component, you can run yarn storybook to start the service.

1.0.4-5

3 years ago

1.0.4-4

3 years ago

1.0.4-7

3 years ago

1.0.4-6

3 years ago

1.0.4-3

3 years ago

1.0.4-2

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago