genpack

1.8.0 • Public • Published

Description

GenPack is a package generator for npm



Installation

npm install genpack -g


Usage

genpack


Quick Start

To quickly generate an npm module, create a cjs folder + an index.cjs file.

e.g.

📁 package-root                
│
└───📁 cjs
     │
     └─── 📝 index.cjs

📝 index.cjs content ↴

const add = function (a, b)
{
    return a + b;
}
module.exports.add = add;



From the CLI, go to the directory, then run:

💻

$ genpack

You will obtain an NPM hybrid package working with cjs, esm and typescript.



Options

Options default Expect Description
--version, -v false boolean Display GenPack version
--repo string Repo URL
--cli false boolean To have the generated module support CLI
--author string Author name
--email string Author email
--license mit, cc0_1, bsd, isc, bsd-2-clause To generate a license for the module


Commands


To update the esm/index.mjs file after modifying the cjs/index.cjs file, run:

$ npm run genpack:build:esm

To update the tests after modifying unit-test.cjs:

$ npm run genpack:build:test

To run the tests:

$ npm run genpack:test

Readme

Keywords

none

Package Sidebar

Install

npm i genpack

Weekly Downloads

0

Version

1.8.0

License

MIT

Unpacked Size

34.7 kB

Total Files

20

Last publish

Collaborators

  • thimpat