Merge branch '4.x'

This commit is contained in:
Hannah Wolfe
2020-04-03 19:24:50 +01:00
9 changed files with 245 additions and 339 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ Supported Environments
Handlebars has been designed to work in any ECMAScript 3 environment. This includes Handlebars has been designed to work in any ECMAScript 3 environment. This includes
- Node.js v6+ - Node.js
- Chrome - Chrome
- Firefox - Firefox
- Safari 5+ - Safari 5+
+6
View File
@@ -0,0 +1,6 @@
module.exports = {
rules: {
'no-console': 0,
'no-var': 0
}
};
+159 -107
View File
@@ -1,115 +1,109 @@
#!/usr/bin/env node #!/usr/bin/env node
const yargs = require('yargs') var argv = parseArgs({
.usage('Precompile handlebar templates.\nUsage: $0 [template|directory]...') 'f': {
.option('f', { 'type': 'string',
type: 'string', 'description': 'Output File',
description: 'Output File', 'alias': 'output'
alias: 'output' },
}) 'map': {
.option('map', { 'type': 'string',
type: 'string', 'description': 'Source Map File'
description: 'Source Map File' },
}) 'a': {
.option('a', { 'type': 'boolean',
type: 'boolean', 'description': 'Exports amd style (require.js)',
description: 'Exports amd style (require.js)', 'alias': 'amd'
alias: 'amd' },
}) 'c': {
.option('c', { 'type': 'string',
type: 'string', 'description': 'Exports CommonJS style, path to Handlebars module',
description: 'Exports CommonJS style, path to Handlebars module', 'alias': 'commonjs',
alias: 'commonjs', 'default': null
default: null },
}) 'h': {
.option('h', { 'type': 'string',
type: 'string', 'description': 'Path to handlebar.js (only valid for amd-style)',
description: 'Path to handlebar.js (only valid for amd-style)', 'alias': 'handlebarPath',
alias: 'handlebarPath', 'default': ''
default: '' },
}) 'k': {
.option('k', { 'type': 'string',
type: 'string', 'description': 'Known helpers',
description: 'Known helpers', 'alias': 'known'
alias: 'known' },
}) 'o': {
.option('o', { 'type': 'boolean',
type: 'boolean', 'description': 'Known helpers only',
description: 'Known helpers only', 'alias': 'knownOnly'
alias: 'knownOnly' },
}) 'm': {
.option('m', { 'type': 'boolean',
type: 'boolean', 'description': 'Minimize output',
description: 'Minimize output', 'alias': 'min'
alias: 'min' },
}) 'n': {
.option('n', { 'type': 'string',
type: 'string', 'description': 'Template namespace',
description: 'Template namespace', 'alias': 'namespace',
alias: 'namespace', 'default': 'Handlebars.templates'
default: 'Handlebars.templates' },
}) 's': {
.option('s', { 'type': 'boolean',
type: 'boolean', 'description': 'Output template function only.',
description: 'Output template function only.', 'alias': 'simple'
alias: 'simple' },
}) 'N': {
.option('N', { 'type': 'string',
type: 'string', 'description': 'Name of passed string templates. Optional if running in a simple mode. Required when operating on multiple templates.',
description: 'alias': 'name'
'Name of passed string templates. Optional if running in a simple mode. Required when operating on multiple templates.', },
alias: 'name' 'i': {
}) 'type': 'string',
.option('i', { 'description': 'Generates a template from the passed CLI argument.\n"-" is treated as a special value and causes stdin to be read for the template value.',
type: 'string', 'alias': 'string'
description: },
'Generates a template from the passed CLI argument.\n"-" is treated as a special value and causes stdin to be read for the template value.', 'r': {
alias: 'string' 'type': 'string',
}) 'description': 'Template root. Base value that will be stripped from template names.',
.option('r', { 'alias': 'root'
type: 'string', },
description: 'p': {
'Template root. Base value that will be stripped from template names.', 'type': 'boolean',
alias: 'root' 'description': 'Compiling a partial template',
}) 'alias': 'partial'
.option('p', { },
type: 'boolean', 'd': {
description: 'Compiling a partial template', 'type': 'boolean',
alias: 'partial' 'description': 'Include data when compiling',
}) 'alias': 'data'
.option('d', { },
type: 'boolean', 'e': {
description: 'Include data when compiling', 'type': 'string',
alias: 'data' 'description': 'Template extension.',
}) 'alias': 'extension',
.option('e', { 'default': 'handlebars'
type: 'string', },
description: 'Template extension.', 'b': {
alias: 'extension', 'type': 'boolean',
default: 'handlebars' 'description': 'Removes the BOM (Byte Order Mark) from the beginning of the templates.',
}) 'alias': 'bom'
.option('b', { },
type: 'boolean', 'v': {
description: 'type': 'boolean',
'Removes the BOM (Byte Order Mark) from the beginning of the templates.', 'description': 'Prints the current compiler version',
alias: 'bom' 'alias': 'version'
}) },
.option('v', { 'help': {
type: 'boolean', 'type': 'boolean',
description: 'Prints the current compiler version', 'description': 'Outputs this message'
alias: 'version' }
}) });
.option('help', {
type: 'boolean',
description: 'Outputs this message'
})
.wrap(120);
const argv = yargs.argv;
argv.files = argv._; argv.files = argv._;
delete argv._; delete argv._;
const Precompiler = require('../dist/cjs/precompiler'); var Precompiler = require('../dist/cjs/precompiler');
Precompiler.loadTemplates(argv, function(err, opts) { Precompiler.loadTemplates(argv, function(err, opts) {
if (err) { if (err) {
@@ -117,8 +111,66 @@ Precompiler.loadTemplates(argv, function(err, opts) {
} }
if (opts.help || (!opts.templates.length && !opts.version)) { if (opts.help || (!opts.templates.length && !opts.version)) {
yargs.showHelp(); printUsage(argv._spec, 120);
} else { } else {
Precompiler.cli(opts); Precompiler.cli(opts);
} }
}); });
function pad(n) {
var str = '';
while (str.length < n) {
str += ' ';
}
return str;
}
function parseArgs(spec) {
var opts = { alias: {}, boolean: [], default: {}, string: [] };
Object.keys(spec).forEach(function (arg) {
var opt = spec[arg];
opts[opt.type].push(arg);
if ('alias' in opt) opts.alias[arg] = opt.alias;
if ('default' in opt) opts.default[arg] = opt.default;
});
var argv = require('minimist')(process.argv.slice(2), opts);
argv._spec = spec;
return argv;
}
function printUsage(spec, wrap) {
var wordwrap = require('wordwrap');
console.log('Precompile handlebar templates.');
console.log('Usage: handlebars [template|directory]...');
var opts = [];
var width = 0;
Object.keys(spec).forEach(function (arg) {
var opt = spec[arg];
var name = (arg.length === 1 ? '-' : '--') + arg;
if ('alias' in opt) name += ', --' + opt.alias;
var meta = '[' + opt.type + ']';
if ('default' in opt) meta += ' [default: ' + JSON.stringify(opt.default) + ']';
opts.push({ name: name, desc: opt.description, meta: meta });
if (name.length > width) width = name.length;
});
console.log('Options:');
opts.forEach(function (opt) {
var desc = wordwrap(width + 4, wrap + 1)(opt.desc);
console.log(' %s%s%s%s%s',
opt.name,
pad(width - opt.name.length + 2),
desc.slice(width + 4),
pad(wrap - opt.meta.length - desc.split(/\n/).pop().length),
opt.meta
);
});
}
@@ -17,7 +17,7 @@ cd "$( dirname "$( readlink -f "$0" )" )" || exit 1
unset npm_config_prefix unset npm_config_prefix
echo "Handlebars should be able to run in various versions of NodeJS" echo "Handlebars should be able to run in various versions of NodeJS"
for i in 6 7 8 9 10 11 12 13; do for i in 0.10 0.12 4 5 6 7 8 9 10 11 ; do
rm target node_modules package-lock.json -rf rm target node_modules package-lock.json -rf
mkdir target mkdir target
nvm install "$i" nvm install "$i"
+1 -1
View File
@@ -5,7 +5,7 @@ import { registerDefaultDecorators } from './decorators';
import logger from './logger'; import logger from './logger';
import { resetLoggedProperties } from './internal/proto-access'; import { resetLoggedProperties } from './internal/proto-access';
export const VERSION = '4.7.5'; export const VERSION = '4.7.6';
export const COMPILER_REVISION = 8; export const COMPILER_REVISION = 8;
export const LAST_COMPATIBLE_COMPILER_REVISION = 7; export const LAST_COMPATIBLE_COMPILER_REVISION = 7;
+57 -222
View File
@@ -1373,7 +1373,8 @@
"camelcase": { "camelcase": {
"version": "5.3.1", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true
}, },
"camelcase-keys": { "camelcase-keys": {
"version": "2.1.0", "version": "2.1.0",
@@ -1663,51 +1664,6 @@
"integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
"dev": true "dev": true
}, },
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"requires": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"clone": { "clone": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
@@ -2322,7 +2278,8 @@
"decamelize": { "decamelize": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
"dev": true
}, },
"decode-uri-component": { "decode-uri-component": {
"version": "0.2.0", "version": "0.2.0",
@@ -2470,6 +2427,14 @@
"center-align": "^0.1.1", "center-align": "^0.1.1",
"right-align": "^0.1.1", "right-align": "^0.1.1",
"wordwrap": "0.0.2" "wordwrap": "0.0.2"
},
"dependencies": {
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
"dev": true
}
} }
}, },
"y18n": { "y18n": {
@@ -2876,7 +2841,7 @@
"request": "^2.88.0", "request": "^2.88.0",
"strip-json-comments": "^2.0.1", "strip-json-comments": "^2.0.1",
"tslint": "^5.14.0", "tslint": "^5.14.0",
"typescript": "^3.9.0-dev.20200330" "typescript": "^3.9.0-dev.20200403"
}, },
"dependencies": { "dependencies": {
"fs-extra": { "fs-extra": {
@@ -2891,9 +2856,9 @@
} }
}, },
"typescript": { "typescript": {
"version": "3.9.0-dev.20200330", "version": "3.9.0-dev.20200403",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.0-dev.20200330.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.0-dev.20200403.tgz",
"integrity": "sha512-RI1hwkdnHUbQ78PT/VbLgrMjyb47/8+G2CIfuWW6lBAQIwgqjEyYlKW9PbDRG3WlHXieTMkE3Rjwn9hF08dU3Q==", "integrity": "sha512-5nhBe/DL+UmIQ9jCq5YLcTq/AbKpgPfGlkeinfygap+D7AcuroWfn9W35QBtFl9HVv27x5xE/Y/Hw8xl6dPr7A==",
"dev": true "dev": true
} }
} }
@@ -4570,7 +4535,8 @@
"get-caller-file": { "get-caller-file": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
}, },
"get-func-name": { "get-func-name": {
"version": "2.0.0", "version": "2.0.0",
@@ -5108,6 +5074,14 @@
"center-align": "^0.1.1", "center-align": "^0.1.1",
"right-align": "^0.1.1", "right-align": "^0.1.1",
"wordwrap": "0.0.2" "wordwrap": "0.0.2"
},
"dependencies": {
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
"dev": true
}
} }
}, },
"source-map": { "source-map": {
@@ -7508,8 +7482,7 @@
"minimist": { "minimist": {
"version": "1.2.5", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
"dev": true
}, },
"mixin-deep": { "mixin-deep": {
"version": "1.3.2", "version": "1.3.2",
@@ -8348,6 +8321,12 @@
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
"dev": true "dev": true
},
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
"dev": true
} }
} }
}, },
@@ -8452,6 +8431,7 @@
"version": "2.2.2", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
"integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
"dev": true,
"requires": { "requires": {
"p-try": "^2.0.0" "p-try": "^2.0.0"
} }
@@ -8477,7 +8457,8 @@
"p-try": { "p-try": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
}, },
"package-hash": { "package-hash": {
"version": "3.0.0", "version": "3.0.0",
@@ -9486,12 +9467,14 @@
"require-directory": { "require-directory": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
}, },
"require-main-filename": { "require-main-filename": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
}, },
"requirejs": { "requirejs": {
"version": "2.3.6", "version": "2.3.6",
@@ -9803,7 +9786,8 @@
"set-blocking": { "set-blocking": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
}, },
"set-value": { "set-value": {
"version": "2.0.1", "version": "2.0.1",
@@ -11241,6 +11225,14 @@
"center-align": "^0.1.1", "center-align": "^0.1.1",
"right-align": "^0.1.1", "right-align": "^0.1.1",
"wordwrap": "0.0.2" "wordwrap": "0.0.2"
},
"dependencies": {
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
"dev": true
}
} }
}, },
"has-flag": { "has-flag": {
@@ -11444,7 +11436,8 @@
"which-module": { "which-module": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
}, },
"window-size": { "window-size": {
"version": "0.1.4", "version": "0.1.4",
@@ -11459,76 +11452,9 @@
"dev": true "dev": true
}, },
"wordwrap": { "wordwrap": {
"version": "0.0.2", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
"dev": true
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"requires": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
"strip-ansi": "^5.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
}, },
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
@@ -11581,105 +11507,14 @@
"y18n": { "y18n": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"dev": true
}, },
"yallist": { "yallist": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
"dev": true "dev": true
},
"yargs": {
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",
"integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",
"requires": {
"cliui": "^5.0.0",
"decamelize": "^1.2.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^15.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"yargs-parser": {
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
"integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
} }
} }
} }
+3 -2
View File
@@ -18,12 +18,13 @@
"license": "MIT", "license": "MIT",
"readmeFilename": "README.markdown", "readmeFilename": "README.markdown",
"engines": { "engines": {
"node": ">=6" "node": ">=0.4.7"
}, },
"dependencies": { "dependencies": {
"minimist": "^1.2.5",
"neo-async": "^2.6.0", "neo-async": "^2.6.0",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"yargs": "^14.2.3" "wordwrap": "^1.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"uglify-js": "^3.1.4" "uglify-js": "^3.1.4"
+15 -3
View File
@@ -2,17 +2,29 @@
## Development ## Development
[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.5...master) [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...master)
## v4.7.6 - April 3rd, 2020
Chore/Housekeeping:
- [#1672](https://github.com/wycats/handlebars.js/issues/1672) - Switch cmd parser to latest minimist ([@dougwilson](https://api.github.com/users/dougwilson)
Compatibility notes:
- Restored Node.js compatibility
[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.5...v4.7.6)
## v4.7.5 - April 2nd, 2020 ## v4.7.5 - April 2nd, 2020
Chore/Housekeeping: Chore/Housekeeping:
- Node.js version support has been changed to v6+ - ~Node.js version support has been changed to v6+~ Reverted in 4.7.6
Compatibility notes: Compatibility notes:
- Node.js < v6 is no longer supported - ~Node.js < v6 is no longer supported~ Reverted in 4.7.6
[Commits](https://github.com/wycats/handlebars.js/compare/v4.7.4...v4.7.5) [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.4...v4.7.5)
+2 -2
View File
@@ -2,7 +2,6 @@ Precompile handlebar templates.
Usage: handlebars [template|directory]... Usage: handlebars [template|directory]...
Options: Options:
--help Outputs this message [boolean]
-f, --output Output File [string] -f, --output Output File [string]
--map Source Map File [string] --map Source Map File [string]
-a, --amd Exports amd style (require.js) [boolean] -a, --amd Exports amd style (require.js) [boolean]
@@ -22,4 +21,5 @@ Options:
-d, --data Include data when compiling [boolean] -d, --data Include data when compiling [boolean]
-e, --extension Template extension. [string] [default: "handlebars"] -e, --extension Template extension. [string] [default: "handlebars"]
-b, --bom Removes the BOM (Byte Order Mark) from the beginning of the templates. [boolean] -b, --bom Removes the BOM (Byte Order Mark) from the beginning of the templates. [boolean]
-v, --version Show version number [boolean] -v, --version Prints the current compiler version [boolean]
--help Outputs this message [boolean]