0.2.2 • Published 7 years ago
create-es-module v0.2.2
create-es-module
Helper to create es module
Creating a module
Yarn:
yarn create es-module my-moduleNPM:
npm init es-module my-moduleNPX:
npx create-es-module my-moduleIt will create my-module folder with the default structure.
Installing added dependencies
you need to install added dependencies manually
cd my-module
npm installor
cd my-module
yarn install --enable-pnp and --offline can be used by yarn.
Build
yarn build or npm run build
Builds the module for production to the build folder.
Test
yarn test or npm test
Publish
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.
Add flow
You need to add flow-bin as dev dependency and run init command.
yarn add flow-bin --dev
npx flow initAdd react and use JSX
You need to add react as dependency
yarn add reactWhat’s Included?
- React, JSX, ES6 and Flow syntax support.
- Unit test
- module build and cjs build
TODO
- Add optional
prettier - Add optional
module-grouping-cli - Add optional
eslint
Credits
Credit to create-react-app.
License
MIT