diff --git a/cli.js b/cli.js index 3df546c1..f6c3b8f9 100755 --- a/cli.js +++ b/cli.js @@ -22,6 +22,7 @@ var fs = require('fs'), "break_chained_methods": Boolean, "keep_array_indentation": Boolean, "unescape_strings": Boolean, + "wrap_line_length": Number, // CLI "version": Boolean, "help": Boolean, @@ -46,6 +47,7 @@ var fs = require('fs'), "B": ["--break_chained_methods"], "k": ["--keep_array_indentation"], "x": ["--unescape_strings"], + "w": ["--wrap_line_length"], // non-dasherized hybrid shortcuts "good-stuff": [ "--keep_array_indentation", @@ -125,6 +127,7 @@ function usage(err) { ' -B, --break-chained-methods Break chained method calls across subsequent lines', ' -k, --keep-array-indentation Preserve array indentation', ' -x, --unescape-strings Decode printable characters encoded in xNN notation', + ' -w, --wrap-line-length Wrap lines at next opportunity after N characters [0]', ' --good-stuff Warm the cockles of Crockford\'s heart', '' ]; diff --git a/config/defaults.json b/config/defaults.json index 85110d89..82e802fc 100644 --- a/config/defaults.json +++ b/config/defaults.json @@ -12,5 +12,6 @@ "space_before_conditional": true, "break_chained_methods": false, "eval_code": false, - "unescape_strings": false + "unescape_strings": false, + "wrap_line_length": 0 }