-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-npm.ts
57 lines (51 loc) · 1.27 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
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: '@safelyx/api',
version,
description: 'API client for Safelyx.',
license: 'ISC',
author: 'Safelyx <help@safelyx.com>',
keywords: [
'safelyx',
'api',
'client',
'sdk',
'security',
'automated moderation tools',
'content moderation',
'message moderation',
'image moderation',
'link safety check',
'email verification',
'ugc moderation',
'user-generated content moderation',
'content safety',
'content safety tools',
'content safety api',
'content safety sdk',
'content safety client',
],
repository: {
type: 'git',
url: 'git+https://github.com/safelyx/safelyx-js.git',
},
bugs: {
url: 'https://github.com/safelyx/safelyx-js/issues',
},
engines: {
node: '>=18.0.0',
},
},
});
Deno.copyFileSync('README.md', 'npm/README.md');
const gitTag = new Deno.Command('git', { args: ['tag', version] });
await gitTag.spawn().status;