Code Monkey home page Code Monkey logo

reactstudy's Introduction

Vite React Library Template

A template for React libraries written in JavaScript/TypeScript, using Vite as a bundler.

This project is based upon my Vite Library Template.


Features:

  • Write your components in JavaScript (.jsx) or TypeScript (.tsx);
  • Supports styled-components too!;
  • Prettier, so all your code is properly formatted;

How to

Clone this repository or use the following command to create your local project:

npx degit yuigoto/vite-react-library-template your-project-name

Place your library code under the lib folder and expose it through its index.tsx file.

This project was bootstrapped using yarn create vite, so you can use its commands to execute/build the project:

  • yarn dev: executes the project locally, you can use test-specific code on src and import directly from lib;
  • yarn build: builds and bundles your project, also generates definition files for your coding completion pleasure;
  • yarn preview: not used really, since it's mostly for previewing the production build locally;

Important

This project generates ES modules by default. If you need other builds, like UMD, for example, you might have to tamper with the settings.

When publishing your project, remember to change the package name in package.json, and mind the version number too!

Also, if you end up publishing it as a public package on npm, you need to add this key to the package.json file, or else it will fail:

"publishConfig": {
  "access": "public"
},

Author

See AUTHORS.md for more information.


License

This project is licensed under the MIT License. See LICENSE.md for details.


©2022 YUITI

reactstudy's People

Contributors

bigmang avatar

Watchers

 avatar  avatar

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.