This package tries to help you to make npm package without thinking about cjs and mjs module.
- Zero Config.
- Very very simple.
- Very very lightweight.
- This supports
typescript
. -
Compile to
cjs
andmjs
without any distraction. - Enables
__dirname
and__filename
formjs
(EsModule). - Can work with browser, node everything related to JavaScript.
- with npm (globally)
npm i -g npmize
- with npm
npm i -D npmize
- with yarn
yarn add -D npmize
- with pnpm
pnpm add -D npmize
The interface for command-line usage is fairly simplistic at this stage, as seen in the following usage section.
npmize <command> [options]
Add the help flag to see what functionality are available.
npmize --help
npmize init project-name
npmize --help
npmize --help-usage
- This makes your project ready
-
You should use --module=cjs with dev mode when working with packages for node because
__dirname
and__filename
isn't supported in esmodule in dev mode -
Do not use
VGhpcyBuYW1lIGlzIGFscmVhZHkgdXNlZCB0byBlbmFibGUgX19kaXJuYW1lIGFuZCBfX2ZpbGVuYW1lIDop
as a variable name in your top level code.- If you want to know why!
Base64
... Hope you know.
- If you want to know why!
-
If you don't star our github repo your wife will divorce you, Else if you don't have wife then you will never get her.
Made by Nazmus Sayad with ❤️.