DEV Community

0 seconds of 41 secondsVolume 90%
Press shift question mark to access a list of keyboard shortcuts
00:00
00:00
00:41
 
Shahjada Talukdar for The Destro Dev Show

Posted on

15 8

Released a CLI "create-awesome-package" to bootstrap your JS/TS package πŸš€ πŸ“¦ (with video demo)

This CLI helps to create the package with JS/TS, build system(Webpack/Parcel) and necessary stuff πŸ”₯

It's like create-react-app but for building packages πŸ“¦

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

  • Mainly a bundler like Webpack or Parcel
  • Babel to transpire the code

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

create-awesome-package helps to create the package with the build system and necessary stuff.

You just write your own code πŸ”₯

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

Alt Text

How to install

npm i -g create-awesome-package
Enter fullscreen mode Exit fullscreen mode

How to use

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

Then, Just run

create-awesome-package [package-name]
Enter fullscreen mode Exit fullscreen mode

OR also you can use npx

npx create-awesome-package [package-name]
Enter fullscreen mode Exit fullscreen mode

( if you don't want to globally install it)

and you are done! πŸ‘

Jest Testing is integrated with it.
Just run-

npm run test
Enter fullscreen mode Exit fullscreen mode

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

npm run build
Enter fullscreen mode Exit fullscreen mode

You can watch the video on YouTube to see the COMPLETE DEMO of how to use it πŸ‘‹

I am working on a few more features for it. I will release those soon.

Cheers!
πŸ‘‹

Also posted here https://shahjada.me/2019/12/28/create-awesome-package-released-a-cli-to-bootstrap-your-awesome-package/

As I am trying to contribute contents on the Web, you can buy me a coffee for my hours spent on all of these ❀️😊🌸
Buy Me A Coffee

Inspired from create-react-app

Sentry blog image

How I fixed 20 seconds of lag for every user in just 20 minutes.

Our AI agent was running 10-20 seconds slower than it should, impacting both our own developers and our early adopters. See how I used Sentry Profiling to fix it in record time.

Read more

Top comments (6)

Collapse
 
serhiishvaher profile image
Serhii Shvaher β€’

Thanks for creating and sharing! πŸ‘
What is the main purpose of new package it will create? Is it like JS library or UI components as well?

Collapse
 
destro_mas profile image
Shahjada Talukdar β€’

You are welcome! πŸ‘‹

Right now, it's a Library creator only. It can create JavaScript and TypeScript libraries.

create-awesome-package my-package js

or

create-awesome-package my-package ts

Collapse
 
wfsdesign profile image
wfsdesign β€’

Really cool! Thank you for this!

Collapse
 
destro_mas profile image
Shahjada Talukdar β€’

Welcome πŸ‘‹

If you like, please use and give your feedback 😊

Also, sharing will be much appreciated! 🀝

Collapse
 
wfsdesign profile image
wfsdesign β€’

I definitely will when I get back from vacation. Been taking a break from coding for the holidays.

Thread Thread
 
destro_mas profile image
Shahjada Talukdar β€’

Yup yup, sure!
Thanks a lot!

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free β†’

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay