Move scripts into separate folders

This commit is contained in:
schroda
2025-02-17 02:45:02 +01:00
parent 0a34ae01ba
commit 1ae98afa34
9 changed files with 23 additions and 23 deletions

View File

@@ -93,7 +93,7 @@ module.exports = {
},
},
{
files: ['tools/scripts/*'],
files: ['tools/scripts/**/*'],
rules: {
'no-relative-import-paths/no-relative-import-paths': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],

View File

@@ -12,16 +12,16 @@
"build-md5": "find build -type f | sort | xargs md5sum | awk '{ print $1 }' | tr -d '\n' | md5sum| awk '{ print $1 }' > buildZip/md5sum ",
"build-zip": "cd build && rev=$(git rev-list HEAD --count) && echo r$rev > revision && zip -9 -r ../buildZip/Suwayomi-WebUI-r$rev *",
"lint": "eslint src --ext .ts,.tsx,.js,.jsx --max-warnings=0 --cache",
"createCommitChangelog": "tsx tools/scripts/createCommitChangelog.ts",
"createTranslationChangelog": "tsx tools/scripts/createTranslationChangelog.ts",
"createReleaseChangelog": "tsx tools/scripts/createReleaseChangelog.ts",
"createCommitChangelog": "tsx tools/scripts/release/createCommitChangelog.ts",
"createTranslationChangelog": "tsx tools/scripts/release/createTranslationChangelog.ts",
"createReleaseChangelog": "tsx tools/scripts/release/createReleaseChangelog.ts",
"updateDeps": "tsx tools/scripts/updateDependencies.ts",
"gql:codegen-base": "graphql-codegen --config gql_codegen.ts",
"gql:codegen-formatter": "tsx tools/scripts/codegenFormatter.ts",
"gql:codegen": "yarn gql:codegen-base & yarn gql:codegen-formatter",
"i18n:gen-resources": "tsx tools/scripts/generatei18nResources.ts",
"dayjs:gen-locales-array": "tsx tools/scripts/generateDayJsLocales.ts",
"dayjs:gen-locales-import": "tsx tools/scripts/generateDayJsLocalesImport.ts",
"i18n:gen-resources": "tsx tools/scripts/weblate/generatei18nResources.ts",
"dayjs:gen-locales-array": "tsx tools/scripts/dayjs/generateDayJsLocales.ts",
"dayjs:gen-locales-import": "tsx tools/scripts/dayjs/generateDayJsLocalesImport.ts",
"dayjs:gen-locales": "yarn dayjs:gen-locales-array && yarn dayjs:gen-locales-import",
"prepare": "husky"
},

View File

@@ -9,8 +9,8 @@
import path from 'path';
import fs from 'fs';
const outputFilePath = path.join(import.meta.dirname, '../../src/lib/dayjs/Locales.ts');
const resourcesDirPath = path.join(import.meta.dirname, '../../node_modules/dayjs/locale');
const outputFilePath = path.join(import.meta.dirname, '../../../src/lib/dayjs/Locales.ts');
const resourcesDirPath = path.join(import.meta.dirname, '../../../node_modules/dayjs/locale');
const dayjsLocaleFileNames = fs.readdirSync(resourcesDirPath);

View File

@@ -9,8 +9,8 @@
import path from 'path';
import fs from 'fs';
const outputFilePath = path.join(import.meta.dirname, '../../src/lib/dayjs/LocaleImporter.ts');
const resourcesDirPath = path.join(import.meta.dirname, '../../node_modules/dayjs/locale');
const outputFilePath = path.join(import.meta.dirname, '../../../src/lib/dayjs/LocaleImporter.ts');
const resourcesDirPath = path.join(import.meta.dirname, '../../../node_modules/dayjs/locale');
const dayjsLocaleFileNames = fs.readdirSync(resourcesDirPath);

View File

@@ -8,7 +8,7 @@
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { createCommitChangelog } from './release/CommitChangelog.utils.ts';
import { createCommitChangelog } from './CommitChangelog.utils.ts';
const { sha } = yargs(hideBin(process.argv))
.options({

View File

@@ -9,9 +9,9 @@
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import dayjs from 'dayjs';
import { createCommitChangelog } from './release/CommitChangelog.utils.ts';
import { createTranslationChangelog } from './release/TranslationChangelog.utils.ts';
import { validateWeblateDates } from './weblate/Weblate.utils.ts';
import { createCommitChangelog } from './CommitChangelog.utils.ts';
import { createTranslationChangelog } from './TranslationChangelog.utils.ts';
import { validateWeblateDates } from '../weblate/Weblate.utils.ts';
const { sha, date } = yargs(hideBin(process.argv))
.options({

View File

@@ -8,8 +8,8 @@
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { createTranslationChangelog } from './release/TranslationChangelog.utils.ts';
import { TRANSLATION_CHANGELOG_YARG_OPTIONS_DEFAULT } from './weblate/Weblate.constants.ts';
import { createTranslationChangelog } from './TranslationChangelog.utils.ts';
import { TRANSLATION_CHANGELOG_YARG_OPTIONS_DEFAULT } from '../weblate/Weblate.constants.ts';
const { afterDate, beforeDate, requiredContributionCount, keepKnownContributors } = yargs(hideBin(process.argv))
.options({

View File

@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": [
"./*"
"./**/*"
],
"compilerOptions": {
"moduleResolution": "node"

View File

@@ -12,12 +12,12 @@ import {
fetchWeblateLanguageStats,
getWeblateLanguageStatsFor,
meetsTranslatedPercentThreshold as meetsTranslatedPercentThresholdBase,
} from './weblate/Weblate.utils.ts';
import { WeblateLanguageStatistic } from './weblate/Weblate.types.ts';
import { TRANSLATED_PERCENT_THRESHOLD } from './weblate/Weblate.constants.ts';
} from './Weblate.utils.ts';
import { WeblateLanguageStatistic } from './Weblate.types.ts';
import { TRANSLATED_PERCENT_THRESHOLD } from './Weblate.constants.ts';
const outputFilePath = path.join(import.meta.dirname, '../../src/i18n/index.ts');
const resourcesDirPath = path.join(import.meta.dirname, '../../public/locales');
const outputFilePath = path.join(import.meta.dirname, '../../../src/i18n/index.ts');
const resourcesDirPath = path.join(import.meta.dirname, '../../../public/locales');
const extractLanguageCode = (resourceFileNames: string): string =>
path.basename(resourceFileNames, path.extname(resourceFileNames));