From d6b0ca5a7bb6c4d46928a2a51d7ac88d4215515c Mon Sep 17 00:00:00 2001 From: Krzysztof Grzybek Date: Wed, 27 Jun 2018 21:45:44 +0200 Subject: [PATCH] remove unused file --- src/preprocess.ts | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/preprocess.ts diff --git a/src/preprocess.ts b/src/preprocess.ts deleted file mode 100644 index f5ba0714e..000000000 --- a/src/preprocess.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; -import { filter } from "./helpers"; - -const __SOURCE_DIRECTORY__ = __dirname; -const inputFolder = path.join(__SOURCE_DIRECTORY__, "../", "inputfiles"); - -function preprocess() { - const webidl = require(path.join(inputFolder, "browser.webidl.json")); - - const browser = filter(webidl, (o, n) => { - if (o) { - if (typeof o.tags === "string") { - if (o.tags.indexOf("MSAppOnly") > -1) return false; - if (o.tags.indexOf("MSAppScheduler") > -1) return false; - if (o.tags.indexOf("Diagnostics") > -1) return false; - if (o.tags.indexOf("Printing") > -1 && typeof o.name === "string" && o.name.toLowerCase().startsWith("ms")) return false; - if (o.tags.indexOf("WinPhoneOnly") > -1) return false; - if (o.tags.indexOf("IEOnly") > -1) return false; - } - if (typeof o.exposed === "string") { - if (o.exposed.indexOf("Diagnostics") > -1) return false; - if (o.exposed.indexOf("WorkerDiagnostics") > -1) return false; - if (o.exposed.indexOf("Isolated") > -1) return false; - } - if (o.iterable === "pair-iterator") return false; - if (o.name === "Function") return false; - if (o.name === "MSExecAtPriorityFunctionCallback") return false; - if (o.name === "MSUnsafeFunctionCallback") return false; - } - if (typeof n === "string") { - if (n.indexOf("-") === 0) return false; - } - return true; - }); - - - fs.writeFileSync(path.join(inputFolder, "browser.webidl.preprocessed.json"), JSON.stringify(browser, undefined, 4)); -} - -preprocess(); \ No newline at end of file