diff --git a/commitlint.config.cjs b/commitlint.config.cjs index e9380af8..e1545242 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.cjs @@ -1,6 +1,6 @@ module.exports = { extends: ['@commitlint/config-conventional'], rules: { - 'header-max-length': [0, 'always', 150] - } + 'header-max-length': [0, 'always', 150], + }, } diff --git a/manifest.json b/manifest.json index be65b858..0e6ad858 100644 --- a/manifest.json +++ b/manifest.json @@ -11,7 +11,7 @@ "src": "favicon.ico", "type": "image/png", "sizes": "512x512 128x128" - } + } ], "start_url": ".", "display": "standalone", diff --git a/public/manifest.json b/public/manifest.json index be65b858..0e6ad858 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -11,7 +11,7 @@ "src": "favicon.ico", "type": "image/png", "sizes": "512x512 128x128" - } + } ], "start_url": ".", "display": "standalone", diff --git a/scripts/generate-buildno.cjs b/scripts/generate-buildno.cjs index 9c8551d3..ce3916cb 100644 --- a/scripts/generate-buildno.cjs +++ b/scripts/generate-buildno.cjs @@ -1,22 +1,23 @@ -const childProcess = require("child_process") -const fs = require("fs") -const os = require("os") +const childProcess = require('child_process') +const fs = require('fs') +const os = require('os') const file = './.env' function setEnvValue(key, value) { - if (!fs.existsSync(file)) - fs.writeFileSync('.env', '') - const ENV_VARS = fs.readFileSync(file, "utf8").split(os.EOL); - const target = ENV_VARS.indexOf(ENV_VARS.find((line) => { - return line.match(new RegExp(key)) - })); + if (!fs.existsSync(file)) fs.writeFileSync('.env', '') + const ENV_VARS = fs.readFileSync(file, 'utf8').split(os.EOL) + const target = ENV_VARS.indexOf( + ENV_VARS.find((line) => { + return line.match(new RegExp(key)) + }) + ) ENV_VARS.splice(target, 1, `${key}=${value}`) fs.writeFileSync(file, ENV_VARS.join(os.EOL)) } -(() => { - childProcess.exec("git rev-parse --short HEAD", (err, stdout) => { - setEnvValue("VITE_REACT_APP_GIT_SHA", stdout) - }); -})(); +;(() => { + childProcess.exec('git rev-parse --short HEAD', (err, stdout) => { + setEnvValue('VITE_REACT_APP_GIT_SHA', stdout) + }) +})()