diff --git a/package.json b/package.json index 6f2f4f1a2..95009df7b 100644 --- a/package.json +++ b/package.json @@ -5,15 +5,15 @@ "node": ">=15" }, "scripts": { - "build": "tsc -p ./tsconfig.json && node ./lib/index.js", - "fetch-idl": "tsc -p ./tsconfig.json && node ./lib/idlfetcher.js", - "fetch-mdn": "npm run build && node ./lib/mdnfetcher.js", + "build": "tsc -p ./tsconfig.json && node ./lib/build.js", + "fetch-idl": "tsc -p ./tsconfig.json && node ./lib/fetch-idl.js", + "fetch-mdn": "npm run build && node ./lib/fetch-mdn.js", "fetch": "echo This could take a few minutes... && npm run fetch-idl && npm run fetch-mdn", "baseline-accept": "cpx \"generated\\*\" baselines\\", "lint": "eslint --max-warnings 0 src", "test": "npm run lint && npm run build && node ./lib/test.js", "danger": "danger", - "migrate": "node ./lib/migrate-to-tsc.js" + "migrate": "node ./lib/migrate.js" }, "dependencies": { "@mdn/browser-compat-data": "2.0.7", diff --git a/src/index.ts b/src/build.ts similarity index 97% rename from src/index.ts rename to src/build.ts index 048ffc2cf..fc8996934 100644 --- a/src/index.ts +++ b/src/build.ts @@ -1,4 +1,4 @@ -import * as Browser from "./types"; +import * as Browser from "./build/types"; import * as fs from "fs"; import * as path from "path"; import { @@ -7,11 +7,11 @@ import { markAsDeprecated, mapToArray, arrayToMap, -} from "./helpers"; -import { Flavor, emitWebIdl } from "./emitter"; -import { convert } from "./widlprocess"; -import { getExposedTypes } from "./expose"; -import { getRemovalDataFromBcd } from "./bcd"; +} from "./build/helpers"; +import { Flavor, emitWebIdl } from "./build/emitter"; +import { convert } from "./build/widlprocess"; +import { getExposedTypes } from "./build/expose"; +import { getRemovalDataFromBcd } from "./build/bcd"; function mergeNamesakes(filtered: Browser.WebIdl) { const targets = [ diff --git a/src/bcd.ts b/src/build/bcd.ts similarity index 100% rename from src/bcd.ts rename to src/build/bcd.ts diff --git a/src/emitter.ts b/src/build/emitter.ts similarity index 100% rename from src/emitter.ts rename to src/build/emitter.ts diff --git a/src/expose.ts b/src/build/expose.ts similarity index 100% rename from src/expose.ts rename to src/build/expose.ts diff --git a/src/helpers.ts b/src/build/helpers.ts similarity index 100% rename from src/helpers.ts rename to src/build/helpers.ts diff --git a/src/legacy-namespace.ts b/src/build/legacy-namespace.ts similarity index 100% rename from src/legacy-namespace.ts rename to src/build/legacy-namespace.ts diff --git a/src/types.d.ts b/src/build/types.d.ts similarity index 100% rename from src/types.d.ts rename to src/build/types.d.ts diff --git a/src/widlprocess.ts b/src/build/widlprocess.ts similarity index 100% rename from src/widlprocess.ts rename to src/build/widlprocess.ts diff --git a/src/idlfetcher.ts b/src/fetch-idl.ts similarity index 100% rename from src/idlfetcher.ts rename to src/fetch-idl.ts diff --git a/src/mdnfetcher.ts b/src/fetch-mdn.ts similarity index 100% rename from src/mdnfetcher.ts rename to src/fetch-mdn.ts diff --git a/src/migrate-to-tsc.ts b/src/migrate.ts similarity index 93% rename from src/migrate-to-tsc.ts rename to src/migrate.ts index ede276fc7..e312914a7 100644 --- a/src/migrate-to-tsc.ts +++ b/src/migrate.ts @@ -1,7 +1,7 @@ // Mainly a quick script to migrate the generated files into the // lib folder of a TypeScript clone. // -// node ./lib/migrate-to-tsc.js [optional/file/path/to/tsc] +// node ./lib/migrate.js [optional/file/path/to/tsc] import { existsSync, readdirSync, readFileSync, writeFileSync } from "fs"; import { join } from "path";