Skip to content

Commit ffbbe23

Browse files
committed
fix typo in variable name, add eslint ignores
co-authored by: @lobsterkatie
1 parent 7d62442 commit ffbbe23

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/postbuild.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable no-console */
12
/*
23
This script prepares the central `build` directory for NPM package creation.
34
It first copies all non-code files into the `build` directory, including `package.json`, which
@@ -47,19 +48,20 @@ ASSETS.forEach(asset => {
4748
const tmpCopyBundles = !process.argv.includes('-skipBundleCopy');
4849
if (tmpCopyBundles) {
4950
const npmTmpBundlesPath = path.resolve(NPM_BUILD_DIR, 'build');
50-
const cdnBundlesPaht = path.resolve('build', 'bundles');
51+
const cdnBundlesPath = path.resolve('build', 'bundles');
5152
try {
5253
if (!fs.existsSync(npmTmpBundlesPath)) {
5354
fs.mkdirSync(npmTmpBundlesPath);
5455
}
55-
fse.copy(cdnBundlesPaht, npmTmpBundlesPath);
56+
void fse.copy(cdnBundlesPath, npmTmpBundlesPath);
5657
} catch (error) {
5758
console.error(`Error while tmp copying CDN bundles to ${NPM_BUILD_DIR}`);
5859
process.exit(1);
5960
}
6061
}
6162
// package.json modifications
6263
const packageJsonPath = path.resolve(NPM_BUILD_DIR, 'package.json');
64+
// eslint-disable-next-line @typescript-eslint/no-var-requires
6365
const pkgJson: { [key: string]: unknown } = require(packageJsonPath);
6466

6567
// modify entry points to point to correct paths (i.e. strip out the build directory)
@@ -75,7 +77,7 @@ delete pkgJson.jest;
7577
try {
7678
fs.writeFileSync(packageJsonPath, JSON.stringify(pkgJson, null, 2));
7779
} catch (error) {
78-
console.error(`Error while writing package.json to disk`);
80+
console.error('Error while writing package.json to disk');
7981
process.exit(1);
8082
}
8183

0 commit comments

Comments
 (0)