npmize

1.0.12 • Public • Published

npmize

This package tries to help you to make npm package without thinking about cjs and mjs module.

Features

  • Zero Config.
  • Very very simple.
  • Very very lightweight.
  • This supports typescript.
  • Compile to cjs and mjs without any distraction.
  • Enables __dirname and __filename for mjs(EsModule).
  • Can work with browser, node everything related to JavaScript.
npm package

Installation

  • 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



Command Line Interface

The interface for command-line usage is fairly simplistic at this stage, as seen in the following usage section.

Usage

npmize <command> [options]

How to use?

Add the help flag to see what functionality are available.

npmize --help

Example:

npmize init project-name
npmize --help
npmize --help-usage
  • This makes your project ready

Note:

  • 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 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 ❤️.

Package Sidebar

Install

npm i npmize

Weekly Downloads

35

Version

1.0.12

License

ISC

Unpacked Size

74.6 kB

Total Files

19

Last publish

Collaborators

  • nazmussayad