packk

1.0.7 • Public • Published

(npm) packk

Simple to use tool that packs and minifies JavaScript files into one single file.

(back to top)

Getting Started

This is a command line tool only. The following steps demonstrate the installation and usage.

Prerequisites

  • npm
    npm install npm@latest -g

Installation and Usage

  1. Install via NPM

    npm i -g packk
  2. Generate a packk.json template file. This is where all the configuration will be.

    packk init
  3. Configure the packk file

    {
     "output": "./dist/out.js",
     "prefix": "This will be shown before the source code in the packaged file",
     "anonymize": true,
     "files": [
       "./src/foo.js",
       "./src/bar.js",
       "./src/foobar.js"
     ]
    }

    Note: if the anonymize flag is set to true, the entire packaged code will be wrapped in an anonymous function so that it is not accessible from the browser console.

  4. Package the source files

    packk <filepath to packk.json file>

(back to top)

Contact

E-Mail: plate.felix@gmx.de

Project Link: https://github.com/tensoid/packk

NPM Link: https://www.npmjs.com/package/packk

(back to top)

Readme

Keywords

none

Package Sidebar

Install

npm i packk

Weekly Downloads

1

Version

1.0.7

License

GPL-3.0

Unpacked Size

41.8 kB

Total Files

5

Last publish

Collaborators

  • tensoid