Skip to content

Commit c422cc3

Browse files
Minor cleanup
1 parent 3999137 commit c422cc3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/npm.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@ if (Deno.args.length !== 1 || !/^(dev|prod)$/.test(Deno.args[0])) {
1212
const [env] = Deno.args;
1313

1414
const GITHUB_REPOSITORY = Deno.env.get('GITHUB_REPOSITORY');
15+
1516
const readme = (await Deno.readTextFile('README.md')).split(/[\r\n]+/);
1617
const [description] = readme.filter((s) => /^\w/.test(s));
17-
const keywords = readme.map((s) => s.match(/^\!\[(.*)\]\((.*)\)/))
18+
const keywords = readme.map((s) => s.match(/^\!\[(.*)\]\((.*)\)$/))
1819
.filter((m) => m && m[2].startsWith('https://img.shields.io/badge/'))
1920
.map((m) => m![1]);
2021

21-
await emptyDir('./npm');
22+
const outDir = './npm';
23+
24+
await emptyDir(outDir);
25+
2226
await build({
2327
test: env === 'dev',
2428
importMap: 'deno.json',
2529
entryPoints: Object.entries(denoJson.exports)
2630
.map(([name, path]) => name === '.' ? path : { name, path }),
27-
outDir: './npm',
31+
outDir,
2832
shims: {
2933
deno: env === 'dev' ? 'dev' : false,
3034
},

0 commit comments

Comments
 (0)