diff options
author | XhmikosR <xhmikosr@gmail.com> | 2022-03-11 12:38:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-11 12:38:02 +0300 |
commit | c637cde2d99f9338b6b2013e3f8d1418a888b45d (patch) | |
tree | 80d046e3ca646f2256074f68b169bb78d1968741 | |
parent | e00a853a0e65c084aa0a554eab213b7b9577b5dd (diff) |
Update build scripts from upstream and minor lint tweaks (#1260)
-rw-r--r-- | .eslintrc.json | 2 | ||||
-rw-r--r-- | .fantasticonrc.js | 8 | ||||
-rw-r--r-- | build/build-pages.js | 2 | ||||
-rw-r--r-- | build/vnu-jar.js | 10 |
4 files changed, 12 insertions, 10 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index b336507b8..14450634d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "node": true }, "parserOptions": { - "ecmaVersion": 2018 + "ecmaVersion": 2019 }, "extends": "eslint:recommended", "rules": { diff --git a/.fantasticonrc.js b/.fantasticonrc.js index aded92c19..6a561f176 100644 --- a/.fantasticonrc.js +++ b/.fantasticonrc.js @@ -1,4 +1,6 @@ -const codepoints = require('./font/bootstrap-icons.json'); +'use strict' + +const codepoints = require('./font/bootstrap-icons.json') module.exports = { inputDir: './icons', // (required) @@ -6,7 +8,7 @@ module.exports = { fontTypes: ['woff2', 'woff'], assetTypes: ['css', 'scss', 'json', 'html'], name: 'bootstrap-icons', - codepoints: codepoints, + codepoints, prefix: 'bi', selector: '.bi', fontsUrl: './fonts', @@ -31,4 +33,4 @@ module.exports = { woff2: './font/fonts/bootstrap-icons.woff2', eot: './font/fonts/bootstrap-icons.eot' } -}; +} diff --git a/build/build-pages.js b/build/build-pages.js index b851b3aca..911524dc7 100644 --- a/build/build-pages.js +++ b/build/build-pages.js @@ -33,7 +33,7 @@ tags: if (VERBOSE) { console.log(`${picocolors.cyan(iconBasename)}: Page already exists; skipping`) } - } catch (_) { + } catch { await fs.writeFile(pageName, pageTemplate) console.log(picocolors.green(`${iconBasename}: Page created`)) } diff --git a/build/vnu-jar.js b/build/vnu-jar.js index 2f77c3f87..6885015ca 100644 --- a/build/vnu-jar.js +++ b/build/vnu-jar.js @@ -2,17 +2,17 @@ /*! * Script to run vnu-jar if Java is available. - * Copyright 2017-2020 The Bootstrap Authors - * Copyright 2017-2020 Twitter, Inc. + * Copyright 2017-2022 The Bootstrap Authors + * Copyright 2017-2022 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ 'use strict' -const childProcess = require('child_process') +const { execFile, spawn } = require('child_process') const vnu = require('vnu-jar') -childProcess.exec('java -version', (error, stdout, stderr) => { +execFile('java', ['-version'], (error, stdout, stderr) => { if (error) { console.error('Skipping vnu-jar test; Java is missing.') return @@ -40,7 +40,7 @@ childProcess.exec('java -version', (error, stdout, stderr) => { args.splice(0, 0, '-Xss512k') } - return childProcess.spawn('java', args, { + return spawn('java', args, { shell: true, stdio: 'inherit' }) |