0.0.3 • Published 5 years ago

lib-export v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

lib-export

CLI for making pure types exportable

Note: This plug-in is made for creating single-file simple modules, for complex modules, please use Rollup, Webpack, Gulp or other tools

Features

  • Blazing fast
  • Lightweight
  • No dependecies
  • Available CLI-mode
  • Available library-mode
  • Custom options for targets

Installation

npm i -g lib-export

Options

See example, there all of options shown

Usage

CLI mode

lib-export -name LibraryName -file YOUR_FILE.js -output YOUR_FILE.browser.js --no-amd --no-worker --no-this --no-commonjs

Library mode

const libexport = require("lib-export");

libexport({
  name: "LibraryName",
  output: "YOUR_FILE.browser.js", // Optional, by default suffix will be .processed.js
  file: "YOUR_FILE.js",
  "no-amd": true,
  "no-worker": true,
  "no-this": true,
  "no-commonjs": true
})
  .then(() => console.log("Done"))
  .catch(err => console.error("What??", err));

License

MIT