eryk-sandecki-test-test-3
v1.0.14
Published
A package containing generic components, utils for application
Downloads
3
Readme
trading-bot-frontend-shared
Table of Contents
Installation
Recommend you to use this version Node v21.7.1.
- Node_Modules
npm install or npm i
- Commit lint required global for commit
npm install -g @commitlint/cli @commitlint/config-conventional
Deploy
npm run build-storybook
After build
npm run deploy
Build Library
npm run build-library
Start
npm run start
npm run storybook
After run local environment you can use some component in sample/index.tsx.
Publish
Publish requires authorize users before publish.
Before publish you need to bump up version in package.json.
npm publish
Instruction
Before commit are call actions:
- branch name lint
- stylelint
- eslint ts
- eslint tsx
- prettier
- commit syntax
If you need skip linters, after the commit message you have to put command:
git commit -m "<message>" --no-verify
Integration
- We need to extends types in types/reducers.ts
//@crypto-trading-hub
import { TMainState as TLibraryState } from '@crypto-trading-hub/trading-bot-frontend-shared';
export type TMainState = TLibraryState & { ...restReducers }
- Add reducers to store/reducers.ts
// @crypto-trading-hub
import { reducers as libraryReducers } from '@crypto-trading-hub/trading-bot-frontend-shared';
const reducers = {
...libraryReducers,
...restReducers,
};
- Add watcher store/watchers.ts
// @crypto-trading-hub
import { watchers as libraryWatchers } from '@crypto-trading-hub/trading-bot-frontend-shared';
const watchers: Array<Saga<any>> = [
...libraryWatchers,
...restWatchers,
];
- Import scss file to apply styles index.scss
@import '@crypto-trading-hub/trading-bot-frontend-shared/src/styles/common.scss';
Bump Up Packages
After bump up, please make sure that these elements of application works correctly:
- npm run build
- npm run build-library
- npm run build-storybook
- npm run storybook
- npm run test
- npm start
- (linters: branch, commit, eslint, prettier)