loading...
Cover image for Webpack or Parcel? ๐Ÿค” Use this CLI to bootstrap your Package with whichever you want ๐Ÿ“ฆ
The Destro Dev Show

Webpack or Parcel? ๐Ÿค” Use this CLI to bootstrap your Package with whichever you want ๐Ÿ“ฆ

destro_mas profile image Shahjada Talukdar ใƒป1 min read

TLDR:It's like create-react-app but for building packages๐Ÿ“ฆ

npx create-awesome-package [package-name]

This CLI helps to create the package with JavaScript/TypeScript, build system(Webpack/Parcel) and necessary stuff!

You just write your code ๐Ÿš€๐Ÿ”ฅ

Itโ€™s a manual process to arrange all your boilerplate code, Webpack, Parcel or other build systems to transpile to ES5, etc. and then build your desired package.

To fix that, I have published a CLI tool, which will help us to do those things, and you will be ready to do your actual code right away.

The name of the CLI is create-awesome-package

You can find this on ๐Ÿ‘‰NPMJS https://www.npmjs.com/package/create-awesome-package

How to use

Go to your root of the package you want to build.

Then, Just run this to bootstrap your package with JS

npx create-awesome-package my-package

Alt Text

Alt Text

and you are done! ๐Ÿ‘

Jest Testing is also integrated with it.
Just run-

npm run test

If you want to build the package into one single file with ES5 transpilation, Just run-

npm run build

Cheers!
๐Ÿ‘‹

Inspired from create-react-app

Posted on by:

destro_mas profile

Shahjada Talukdar

@destro_mas

Senior Software Engineer @eBay. Tech enthusiast, loves JS + few other languages. Keen to learn about Software Engineering/Architecture. ๐Ÿ‘‹

The Destro Dev Show

Hub for Cutting edge Software/Web development Podcast and tutorial. made with โค๏ธ in Berlin!

Discussion

pic
Editor guide