1.1.0 • Published 9 years ago

js-packager v1.1.0

Weekly downloads
28
License
-
Repository
-
Last release
9 years ago

What?

js-packager was made to be a simple tool to pack and compress your .js files using uglify-js

How?

  1. install globally: npm install -g js-packager

  2. Create a file with .json extension (pack.json by default, but you can use any other name) at the same folder where your .js scripts are

  3. Your json file should look similar to this:

{
    "../scripts.js":{
        "header":"(function(w,d,$){$(d).ready(function(){",
        "footer":"});})(window,document,jQuery);",
        "mangle":true,
        "files":[
            "./base.js",
            "./dois.js"
        ]
    }
}
Options header, footer and mangle are optional:
header can be a part of code that will be inserted before any code
footer can be a part of code that will be inserted after any code
mangle turns mangle on or off (ex: variable name becomes just n, address becomes just a...)
files is a list of files to merge and minify
  1. Run the command "jspack" where your pack.json is located, if you are using other name for your json use: "jspack mypack.json"

  2. The paths of output file and input files are relative to the pack.json (in the case, output.js) will be the merge of all input files

1.1.0

9 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago