cra-template-npm-library

Create React App template to build and publish NPM libraries with Typescript support, and rollup, eslint and stylelint configurations


Keywords
react, create-react-app, cra-template, template, react-testing-library, testing-library, eslint, npm, rollup, stylelint, library, babel, publish, create-react-library, typescript, create-react-app-template, npm-library
License
MIT
Install
npm install cra-template-npm-library@2.0.5

Documentation

Deprecation notice

Create React App is not updated by its maintainers anymore. So this project can't be updated as well. I recommend to use React Library Template which has all the same functionality plus new features.

NPM library Create React App template

NPM library Create React App template logo

Create React App (CRA) template to build and publish NPM libraries with rollup, eslint and stylelint configurations.

🎁👌🤓 NEW! Now with Typescript support.

Read full documentation.

Visit Demo Storybook.

Features

Quickstart

npx create-react-app %PROJECT_NAME% --template npm-library
yarn create react-app %PROJECT_NAME% --template npm-library
pnpm create react-app %PROJECT_NAME% --template npm-library

Then

cd %PROJECT_NAME%
npm run prepare
yarn run prepare
pnpm run prepare