Skip to content

Make sure the scripts in src/ matches their npm commands #993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts → src/build.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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 = [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/migrate-to-tsc.ts → src/migrate.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down