diff --git a/build.js b/build.js index 0719df516f8de..670c081987d72 100755 --- a/build.js +++ b/build.js @@ -163,26 +163,23 @@ function buildLocale (source, locale) { pattern: '**/*.html', partials: 'layouts/partials', helpers: { + apidocslink: require('./scripts/helpers/apidocslink.js'), + changeloglink: require('./scripts/helpers/changeloglink.js'), copyright: require('./scripts/helpers/copyright-year.js'), equals: require('./scripts/helpers/equals.js'), + majorapidocslink: require('./scripts/helpers/majorapidocslink.js'), startswith: require('./scripts/helpers/startswith.js'), - changeloglink: require('./scripts/helpers/changeloglink.js'), strftime: require('./scripts/helpers/strftime.js'), - apidocslink: require('./scripts/helpers/apidocslink.js'), - majorapidocslink: require('./scripts/helpers/majorapidocslink.js'), + stripv: require('./scripts/helpers/stripv.js'), summary: require('./scripts/helpers/summary.js'), - json: function (context) { - return JSON.stringify(context) - }, - getListJson: function (context) { - var result = context.map(function (item) { - return { - title: item.title, - date: item.date, - local: true, - path: item.path.replace(/\\/, '/') - } - }) + json: (context) => JSON.stringify(context), + getListJson: (context) => { + const result = context.map(item => ({ + title: item.title, + date: item.date, + local: true, + path: item.path.replace(/\\/, '/') + })) return JSON.stringify(result) } } diff --git a/layouts/download-releases.hbs b/layouts/download-releases.hbs index a2e836dd288e7..8be6a99ad111d 100644 --- a/layouts/download-releases.hbs +++ b/layouts/download-releases.hbs @@ -32,7 +32,7 @@
{{#each project.versions}}{{downloads.currentVersion}}: {{version.node}} (includes npm {{version.npm}})
+{{downloads.currentVersion}}: {{stripv version.node}} (includes npm {{version.npm}})
{{downloads.intro}}