remove node_modules and .gitignore them

This commit is contained in:
2023-11-24 14:40:32 -05:00
parent 5f6e638903
commit a74d7b91b8
8963 changed files with 1 additions and 874175 deletions
-24
View File
@@ -1,24 +0,0 @@
const fs = require("fs");
const path = require("path");
const assert = require("assert");
const root = path.join(__dirname, "..");
const pkgJson = require(path.join(root, "package.json"));
const srcFolders = fs.readdirSync(path.join(root, "src"));
assert(pkgJson.exports === undefined, "We cannot support package.json exports yet.");
/**
* We probably can't enable package.json exports until
* dropping support for Node.js 14.x and TypeScript 4.6.
*/
process.exit(0);
for (const srcFolder of srcFolders) {
if (fs.lstatSync(path.join(root, "src", srcFolder)).isDirectory()) {
if (!pkgJson.exports["./" + srcFolder]) {
throw new Error(`${srcFolder} is missing exports statement in package.json`);
}
}
}