Giter Site home page Giter Site logo

turkyden / react-component-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from one-template/react-component-template

0.0 1.0 0.0 230 KB

๐ŸŒˆ Quickly develop, test, package, release, and document development, packaging, and deployment of react components. ๅฟซ้€Ÿ่ฟ›่กŒ react ็ป„ไปถๅผ€ๅ‘ใ€ๆต‹่ฏ•ใ€ๆ‰“ๅŒ…ใ€ๅ‘ๅธƒ๏ผŒๆ–‡ๆกฃๅผ€ๅ‘ใ€ๆ‰“ๅŒ…ใ€้ƒจ็ฝฒใ€‚

Home Page: https://one-template.github.io/react-component-template/

License: MIT License

JavaScript 14.06% TypeScript 85.55% Less 0.39%

react-component-template's Introduction

๐ŸŒˆ react-component-template

A template for rapid development of React components, which satisfies component development, testing, packaging, release, document development, document packaging, and document deployment.

English | ็ฎ€ไฝ“ไธญๆ–‡

๐Ÿ’– How to use?

๐Ÿ’Ž Catalog Introduction

โ”œโ”€โ”€ assets                 Store fixed resources
โ”œโ”€โ”€ docs                   Component documentation
โ”‚   โ”œโ”€โ”€ example            Demo tsx
โ”‚   โ”œโ”€โ”€ changelog.md       Used to display component history
โ”‚   โ””โ”€โ”€ demo.md            Used to display component Demo
โ”œโ”€โ”€ src                    Component home directory
โ”‚   โ”œโ”€โ”€ index.ts           Component registration
โ”‚   โ””โ”€โ”€ template.tsx       Component implementation code
โ”œโ”€โ”€ tests                  Component test code
โ”‚   โ”œโ”€โ”€ __snapshots__      Snapshot test file output without manual modification
โ”‚   โ”œโ”€โ”€ setup.ts           Init jest script
โ”‚   โ””โ”€โ”€ index.spec.tsx     Test file
โ”œโ”€โ”€ .eslintrc.js           eslint config
โ”œโ”€โ”€ .fatherrc.ts           father config
โ”œโ”€โ”€ .umirc.ts              dumi config
โ”œโ”€โ”€ jest.config.js         jest config
โ””โ”€โ”€ tsconfig.json          typescript config

The rest of the documents can be consulted by yourself.

๐Ÿค– Command introduction

Name Description Remarks
npm run start Component development Document usage dumi, component development and documentation development together
npm run test Component test -
npm run lint eslint verify -
npm run build Component packaging Use father
npm run coverage Code coverage review -
npm publish Component release It is recommended to remove prepublishOnly for the first time
npm run docs:build Document packaging -
npm run docs-dev:build Document packaging Use dumi dev environment
npm run docs:deploy Document release The default is to use GitHub Pages
npm run deploy Document package release -

๐Ÿญ Component

Development

npm i
npm run start
# http://localhost:8080/

Test

npm run test

Unpack

npm run build
  • Use father
  • More view official website configuration
  • The package file is generated in the dist file by default

Release

package.json introduction

  1. If you want to publish npm, private needs to be set to false.
  2. The build command can be modified according to actual conditions.
  3. After main decides to install the component, import points to it.
  4. files Contains the files at the time of publishing, and includes README.md by default.
  5. Others can be understood according to the meaning of the word.

๐Ÿ“š Documentation

Start

npm run start

Online preview

https://one-template.github.io/react-component-template/

Description

  • Use dumi
  • Use basic layout, please add more by yourself
  • Because the document is deployed on GitHub Pages, the base and publicPath of .umirc.ts are set to the project name
  • One ๐ŸŒฐ : ant-design-colorful

๐ŸŽˆ Aide

๐ŸŽ‰ Who are using๏ผŸ

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.