diff --git a/README.md b/README.md index ab3541e..65302c3 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,15 @@ npm install -g jsnice $ jsnice --help Usage: jsnice - jsnice [--no-pretty] [--no-rename] [--no-types] [--suggest] + jsnice [--no-pretty] [--no-transpile] [--no-packers] [--no-rename] [--no-types] [--suggest] jsnice (--help | --version) Options: --help Show this text --version Show jsnice version info --no-pretty Dont prettify the script + --no-transpile Dont transpile to ES5 + --no-packers Dont detect packers --no-rename Dont rename variables --no-types Dont add doc strings for params/returns --suggest Suggest new local names e.g. local$$2 diff --git a/bin/jsnice b/bin/jsnice index 4c48a68..fa56402 100755 --- a/bin/jsnice +++ b/bin/jsnice @@ -8,13 +8,15 @@ var jsnice = require('../'); var doc = [ 'Usage:', ' jsnice ', - ' jsnice [--no-pretty] [--no-rename] [--no-types] [--suggest] ', + ' jsnice [--no-pretty] [--no-packers] [--no-transpile] [--no-rename] [--no-types] [--suggest] ', ' jsnice (--help | --version)', '', 'Options:', ' --help Show this text', ' --version Show jsnice version info', ' --no-pretty Dont prettify the script', + ' --no-packers Dont detect packers', + ' --no-transpile Dont transpile to ES5', ' --no-rename Dont rename variables', ' --no-types Dont add doc strings for params/returns', ' --suggest Suggest new local names e.g. local$$2', @@ -30,6 +32,8 @@ var filePath = args['']; var js = fs.readFileSync(filePath); var options = { pretty: !args['--no-pretty'], + packers: !args['--no-packers'], + transpile: !args['--no-transpile'], types: !args['--no-types'], rename: !args['--no-rename'], suggest: args['--suggest'], diff --git a/lib/index.js b/lib/index.js index 2fbd134..f8bc2bf 100644 --- a/lib/index.js +++ b/lib/index.js @@ -10,6 +10,8 @@ module.exports.nicify = function(js, options, callback) { options = options || {}; var query = { pretty: (options.pretty === undefined)? 1 : (options.pretty)? 1 : 0, + packers: (options.packers === undefined)? 1 : (options.packers)? 1 : 0, + transpile: (options.transpile === undefined)? 1 : (options.transpile)? 1 : 0, rename: (options.rename === undefined)? 1 : (options.rename)? 1 : 0, types: (options.types === undefined)? 1 : (options.types)? 1 : 0, suggest: (options.suggest === undefined)? 0 : (options.suggest)? 1 : 0, diff --git a/package.json b/package.json index 8e35573..78a1050 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsnice", - "version": "0.2.0", + "version": "0.3.0", "description": "Run JSNice on your javascripts", "main": "lib/index.js", "scripts": {