-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-npm.ts
46 lines (40 loc) · 1021 Bytes
/
build-npm.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { build, emptyDir } from 'jsr:@deno/dnt@0.41.3';
await emptyDir('./npm');
const version = JSON.parse(Deno.readTextFileSync('./deno.json')).version;
await build({
entryPoints: ['./mod.ts'],
outDir: './npm',
shims: {
deno: true,
},
typeCheck: false,
package: {
name: 'shurley',
version,
description: 'Validate or fix URLs from user input. People make mistakes!',
license: 'ISC',
author: 'Bruno Bernardino <me@brunobernardino.com>',
keywords: [
'url',
'fix',
'parser',
'fixer',
'validator',
'lax',
'user-input',
'url-parser',
'url-fixer',
'url-lax-parser',
],
repository: {
type: 'git',
url: 'git+https://github.com/BrunoBernardino/shurley.git',
},
bugs: {
url: 'https://github.com/BrunoBernardino/shurley/issues',
},
},
});
Deno.copyFileSync('README.md', 'npm/README.md');
const gitTag = new Deno.Command('git', { args: ['tag', version] });
await gitTag.spawn().status;