aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/banner.js2
-rw-r--r--build/change-version.js12
2 files changed, 5 insertions, 9 deletions
diff --git a/build/banner.js b/build/banner.js
index df82ff32e..c591cc1ad 100644
--- a/build/banner.js
+++ b/build/banner.js
@@ -3,7 +3,7 @@
const pkg = require('../package.json')
const year = new Date().getFullYear()
-function getBanner(pluginFilename) {
+const getBanner = pluginFilename => {
return `/*!
* Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
* Copyright 2011-${year} ${pkg.author}
diff --git a/build/change-version.js b/build/change-version.js
index 63f231ea2..dd55393cb 100644
--- a/build/change-version.js
+++ b/build/change-version.js
@@ -26,15 +26,11 @@ const GLOBBY_OPTIONS = {
}
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
-function regExpQuote(string) {
- return string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
-}
+const regExpQuote = string => string.replace(/[$()*+-.?[\\\]^{|}]/g, '\\$&')
-function regExpQuoteReplacement(string) {
- return string.replace(/\$/g, '$$')
-}
+const regExpQuoteReplacement = string => string.replace(/\$/g, '$$')
-async function replaceRecursively(file, oldVersion, newVersion) {
+const replaceRecursively = async (file, oldVersion, newVersion) => {
const originalString = await fs.readFile(file, 'utf8')
const newString = originalString.replace(
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
@@ -56,7 +52,7 @@ async function replaceRecursively(file, oldVersion, newVersion) {
await fs.writeFile(file, newString, 'utf8')
}
-async function main(args) {
+const main = async args => {
const [oldVersion, newVersion] = args
if (!oldVersion || !newVersion) {