diff options
| author | Shinigami <[email protected]> | 2022-05-04 12:50:58 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-04 12:50:58 +0200 |
| commit | 63f63612fab40c3def72d9ed50d0ac042a078677 (patch) | |
| tree | de7e071bcfdb566100a14b1e66945e6c9eeb5f23 /scripts | |
| parent | 683ee3405c39408d74d74cac0755a26de7a99e35 (diff) | |
| download | faker-63f63612fab40c3def72d9ed50d0ac042a078677.tar.xz faker-63f63612fab40c3def72d9ed50d0ac042a078677.zip | |
refactor!: target es2020 (#848)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/copyMimeTypes.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/copyMimeTypes.ts b/scripts/copyMimeTypes.ts index 9691070c..f56acff9 100644 --- a/scripts/copyMimeTypes.ts +++ b/scripts/copyMimeTypes.ts @@ -6,7 +6,7 @@ import options from '../.prettierrc.cjs'; const rootPath = path.resolve(__dirname, '..'); const mimeDbPath = path.resolve(rootPath, 'node_modules/mime-db/db.json'); -const mimeDbLicencePath = path.resolve( +const mimeDbLicensePath = path.resolve( rootPath, 'node_modules/mime-db/LICENSE' ); @@ -20,10 +20,8 @@ fs.readFile(mimeDbPath, 'utf8', (err, data) => { throw err; } - const licence = fs.readFileSync(mimeDbLicencePath, { encoding: 'utf8' }); - const mimeTypeFileContent = `// This file is generated by scripts/copyMimeTypes.ts\n// Do not edit this file directly. Instead, update mime-db and run \`pnpm run copy:mime-types\`\n\n/*\n${ - licence as string - }*/\n\nexport default ${data as string};\n`; + const license = fs.readFileSync(mimeDbLicensePath, { encoding: 'utf8' }); + const mimeTypeFileContent = `// This file is generated by scripts/copyMimeTypes.ts\n// Do not edit this file directly. Instead, update mime-db and run \`pnpm run copy:mime-types\`\n\n/*\n${license}*/\n\nexport default ${data};\n`; fs.writeFile( mimeTypesTsPath, @@ -33,7 +31,7 @@ fs.readFile(mimeDbPath, 'utf8', (err, data) => { throw err; } - console.log(`Mime types copied to ${mimeTypesTsPath as string}`); + console.log(`Mime types copied to ${mimeTypesTsPath}`); } ); }); |
