aboutsummaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
Diffstat (limited to 'dev')
-rw-r--r--dev/bin/build.js24
-rw-r--r--dev/bin/dictionary-validate.js2
-rw-r--r--dev/bin/schema-validate.js2
-rw-r--r--dev/build-libs.js8
-rw-r--r--dev/dictionary-archive-util.js2
-rw-r--r--dev/dictionary-validate.js4
-rw-r--r--dev/generate-css-json.js6
-rw-r--r--dev/manifest-util.js2
-rw-r--r--dev/schema-validate.js2
9 files changed, 26 insertions, 26 deletions
diff --git a/dev/bin/build.js b/dev/bin/build.js
index ad6254b5..c0339160 100644
--- a/dev/bin/build.js
+++ b/dev/bin/build.js
@@ -55,11 +55,11 @@ async function createZip(directory, excludeFiles, outputFileName, sevenZipExes,
'a',
outputFileName,
'.',
- ...excludeArguments
+ ...excludeArguments,
],
{
- cwd: directory
- }
+ cwd: directory,
+ },
);
return;
} catch (e) {
@@ -85,7 +85,7 @@ async function createJSZip(directory, excludeFiles, outputFileName, onUpdate, dr
zip.file(
fileName.replace(/\\/g, '/'),
fs.readFileSync(path.join(directory, fileName), {encoding: null, flag: 'r'}),
- {}
+ {},
);
}
@@ -96,7 +96,7 @@ async function createJSZip(directory, excludeFiles, outputFileName, onUpdate, dr
const data = await zip.generateAsync({
type: 'nodebuffer',
compression: 'DEFLATE',
- compressionOptions: {level: 9}
+ compressionOptions: {level: 9},
}, onUpdate);
process.stdout.write('\n');
@@ -223,27 +223,27 @@ export async function main() {
const parseArgsConfigOptions = {
all: {
type: 'boolean',
- default: false
+ default: false,
},
default: {
type: 'boolean',
- default: false
+ default: false,
},
manifest: {
- type: 'string'
+ type: 'string',
},
dryRun: {
type: 'boolean',
- default: false
+ default: false,
},
dryRunBuildZip: {
type: 'boolean',
- default: false
+ default: false,
},
version: {
type: 'string',
- default: '0.0.0.0'
- }
+ default: '0.0.0.0',
+ },
};
const argv = process.argv.slice(2);
diff --git a/dev/bin/dictionary-validate.js b/dev/bin/dictionary-validate.js
index a2da31e5..47057c94 100644
--- a/dev/bin/dictionary-validate.js
+++ b/dev/bin/dictionary-validate.js
@@ -24,7 +24,7 @@ async function main() {
if (dictionaryFileNames.length === 0) {
console.log([
'Usage:',
- ' node dictionary-validate [--ajv] <dictionary-file-names>...'
+ ' node dictionary-validate [--ajv] <dictionary-file-names>...',
].join('\n'));
return;
}
diff --git a/dev/bin/schema-validate.js b/dev/bin/schema-validate.js
index 74a42444..4baeb8ab 100644
--- a/dev/bin/schema-validate.js
+++ b/dev/bin/schema-validate.js
@@ -27,7 +27,7 @@ function main() {
if (args.length < 2) {
console.log([
'Usage:',
- ' node schema-validate [--ajv] <schema-file-name> <data-file-names>...'
+ ' node schema-validate [--ajv] <schema-file-name> <data-file-names>...',
].join('\n'));
return;
}
diff --git a/dev/build-libs.js b/dev/build-libs.js
index f1570fad..0d42f340 100644
--- a/dev/build-libs.js
+++ b/dev/build-libs.js
@@ -41,8 +41,8 @@ async function buildLib(scriptPath) {
outfile: path.join(extDir, 'lib', path.basename(scriptPath)),
external: ['fs'],
banner: {
- js: '// @ts-nocheck'
- }
+ js: '// @ts-nocheck',
+ },
});
}
@@ -52,7 +52,7 @@ async function buildLib(scriptPath) {
export async function buildLibs() {
const devLibPath = path.join(dirname, 'lib');
const files = await fs.promises.readdir(devLibPath, {
- withFileTypes: true
+ withFileTypes: true,
});
for (const f of files) {
if (f.isFile()) {
@@ -71,7 +71,7 @@ export async function buildLibs() {
const ajv = new Ajv({
schemas,
code: {source: true, esm: true},
- allowUnionTypes: true
+ allowUnionTypes: true,
});
const moduleCode = standaloneCode(ajv);
diff --git a/dev/dictionary-archive-util.js b/dev/dictionary-archive-util.js
index ead5790b..d8dc7290 100644
--- a/dev/dictionary-archive-util.js
+++ b/dev/dictionary-archive-util.js
@@ -32,7 +32,7 @@ export async function createDictionaryArchiveData(dictionaryDirectory, dictionar
// Level 0 compression used since decompression in the node environment is not supported.
// See dev/lib/zip.js for more details.
const zipWriter = new ZipWriter(zipFileWriter, {
- level: 0
+ level: 0,
});
for (const fileName of fileNames) {
if (/\.json$/.test(fileName)) {
diff --git a/dev/dictionary-validate.js b/dev/dictionary-validate.js
index 3c7cf30b..18532ad6 100644
--- a/dev/dictionary-validate.js
+++ b/dev/dictionary-validate.js
@@ -99,7 +99,7 @@ export async function validateDictionary(mode, archiveData, schemas) {
[/^term_meta_bank_(\d+)\.json$/, schemas.termMetaBankV3],
[/^kanji_bank_(\d+)\.json$/, version === 1 ? schemas.kanjiBankV1 : schemas.kanjiBankV3],
[/^kanji_meta_bank_(\d+)\.json$/, schemas.kanjiMetaBankV3],
- [/^tag_bank_(\d+)\.json$/, schemas.tagBankV3]
+ [/^tag_bank_(\d+)\.json$/, schemas.tagBankV3],
];
await validateDictionaryBanks(mode, entries, schemasDetails);
@@ -118,7 +118,7 @@ export function getSchemas() {
tagBankV3: readSchema('../ext/data/schemas/dictionary-tag-bank-v3-schema.json'),
termBankV1: readSchema('../ext/data/schemas/dictionary-term-bank-v1-schema.json'),
termBankV3: readSchema('../ext/data/schemas/dictionary-term-bank-v3-schema.json'),
- termMetaBankV3: readSchema('../ext/data/schemas/dictionary-term-meta-bank-v3-schema.json')
+ termMetaBankV3: readSchema('../ext/data/schemas/dictionary-term-meta-bank-v3-schema.json'),
};
}
diff --git a/dev/generate-css-json.js b/dev/generate-css-json.js
index adb75495..79baf6f5 100644
--- a/dev/generate-css-json.js
+++ b/dev/generate-css-json.js
@@ -31,13 +31,13 @@ export function getTargets() {
{
cssFilePath: path.join(dirname, '..', 'ext/css/structured-content.css'),
overridesCssFilePath: path.join(dirname, 'data/structured-content-overrides.css'),
- outputPath: path.join(dirname, '..', 'ext/data/structured-content-style.json')
+ outputPath: path.join(dirname, '..', 'ext/data/structured-content-style.json'),
},
{
cssFilePath: path.join(dirname, '..', 'ext/css/display-pronunciation.css'),
overridesCssFilePath: path.join(dirname, 'data/display-pronunciation-overrides.css'),
- outputPath: path.join(dirname, '..', 'ext/data/pronunciation-style.json')
- }
+ outputPath: path.join(dirname, '..', 'ext/data/pronunciation-style.json'),
+ },
];
}
diff --git a/dev/manifest-util.js b/dev/manifest-util.js
index 40bde911..97f7b598 100644
--- a/dev/manifest-util.js
+++ b/dev/manifest-util.js
@@ -99,7 +99,7 @@ export class ManifestUtil {
const {stdout, stderr, status} = childProcess.spawnSync(command, args, {
cwd: dirname,
stdio: 'pipe',
- shell: false
+ shell: false,
});
if (status !== 0) {
const message = stderr.toString('utf8').trim();
diff --git a/dev/schema-validate.js b/dev/schema-validate.js
index 3ad247d9..b25a614e 100644
--- a/dev/schema-validate.js
+++ b/dev/schema-validate.js
@@ -31,7 +31,7 @@ class JsonSchemaAjv {
const ajv = new Ajv({
meta: false,
strictTuples: false,
- allowUnionTypes: true
+ allowUnionTypes: true,
});
const metaSchemaPath = fileURLToPath(import.meta.resolve('ajv/dist/refs/json-schema-draft-07.json'));
/** @type {import('ajv').AnySchemaObject} */