Helper to create es module
Yarn
:
yarn create es-module my-module
NPM
:
npm init es-module my-module
NPX
:
npx create-es-module my-module
It will create my-module
folder with the default structure.
you need to install added dependencies manually
cd my-module
npm install
or
cd my-module
yarn install
--enable-pnp
and --offline
can be used by yarn.
yarn build
or npm run build
Builds the module for production to the build
folder.
yarn test
or npm test
It will publish the module to npm
.
By default files in build
folder is whitelisted to be included in the package.
For more information about list of files in the package visit https://docs.npmjs.com/files/package.json#files.
You need to add flow-bin
as dev dependency and run init
command.
yarn add flow-bin --dev
npx flow init
You need to add react
as dependency
yarn add react
- React, JSX, ES6 and Flow syntax support.
- Unit test
- module build and cjs build
- Add optional
prettier
- Add optional
module-grouping-cli
- Add optional
eslint
Credit to create-react-app.
MIT