2.0.7 • Published 2 years ago

npm-ez v2.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

npm-ez

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.
  • Enables __dirname and __filename for mjs(esmodule).

Installation

  • with npm (globally)
npm i -g npm-ez
  • with npm
npm i -D npm-ez
  • with yarn
yarn add -D npm-ez
  • with pnpm
pnpm add -D npm-ez

Command Line Interface

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

Usage

npm-ez <command> [options]

Example:

npm-ez dev

This starts typescript watch mode.


Commands

CommandDescription
initInitilize package.json
devStart typescript watch mode
buildBuild for prod

Command Options

OptionDescription
--no-installNot to install required dependencies automatically
--no-ignoreNot to add recommended ignore files to gitignore | npmignore
--no-srcNot to create src/index.ts folder when not exists

Command: init

OptionDescription
--binAlso add bin field
--legacyUses .js for fields

Command: dev & build

You can use almost any typescript cli command here by using --tsc. eg: --tsc--jsx=react --> --jsx react

Not allowed list: --project --outDir --module --watch and their aliases

OptionDescription
--module=cjsThis starts dev mode of commonjs module
--module=mjsThis starts dev mode of esmodule module

Command: build

OptionDescription
--nodeThis enables __dirname and __filename in esmodule
--legacyUses .js files and creates package.json with type

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

2.0.5

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago