Giter Site home page Giter Site logo

codes-templates / npm-react Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 6.0 1.79 MB

react-npm-template

Home Page: https://react-npm-template.vercel.app

License: MIT License

JavaScript 18.75% Shell 0.30% TypeScript 44.29% HTML 1.38% CSS 2.95% SCSS 1.72% MDX 28.97% Less 1.64%

npm-react's Introduction

README

Features

  • ๐Ÿ’ป React suport >=16.8.0
  • โœˆ๏ธ Project init with vite
  • ๐Ÿ“ฆ Support cjs & esm

how to use

replace custom-package-name with your package name

Directory structure

Project
โ”œโ”€โ”€ __tests__           # Unit Testing
โ”œโ”€โ”€ babel.config.js     # babel config
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ playground          # dev environment folder (can use source code)
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ public
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ tsconfig.json
โ”‚   โ”œโ”€โ”€ vite-env.d.ts
โ”‚   โ””โ”€โ”€ vite.config.ts
โ”œโ”€โ”€ postcss.config.js  # build styles with postcss
โ”œโ”€โ”€ src                # Package source code
โ”‚   โ”œโ”€โ”€ index.ts       # Package source entry
โ”‚   โ”œโ”€โ”€ stories        # storybook for building UI components and pages
โ”‚   โ”œโ”€โ”€ styles         # styles for Package
โ”‚   โ””โ”€โ”€ types.ts       # ts type declaration for Package
โ”œโ”€โ”€ tsconfig.json      # ts config
โ””โ”€โ”€ tsup.config.ts     # build package with tsup

How to add GITHUB_TOKEN

How to add NPM_TOKEN

  1. update project setting

settings -> actions -> General

./token.png

  1. create npm auth token

  2. then copy npm token, add to github project settings

    • project -> settings -> secrets -> actions -> create new token with name:NPM_TOKEN

How to add NETLIFY_TOKEN

  1. create netlify auth token

  2. then copy netlify token, add to github project settings

    • project -> settings -> secrets -> actions -> create new token with name:NETLIFY_TOKEN
  3. create a site on netlify

  4. copy the site_id from your netlify site settings, add it to github project settings

    • project -> settings -> secrets -> actions -> create new token with name:NETLIFY_SITE_ID
  5. Stop Build from Build settings of site

  6. build-command-javascript-heap-out-of-memory

How to generate VERCEL_ORG_ID / VERCEL_PROJECT_ID

  1. run npx vercel in project root folder

  2. open .vercel/project.json

  3. copy orgId & projectId, add it to github project settings

    • project -> settings -> secrets -> actions -> create new token with name:VERCEL_ORG_ID & VERCEL_PROJECT_ID
  4. create vercel token, add it to github project settings

    • project -> settings -> secrets -> actions -> create new token with name:VERCEL_TOKEN
  5. change project build setting

    setting

Sponsor

Special Sponsor

special sponsor appwrite

npm-react's People

Contributors

jerrywu001 avatar wjy199203276912 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.