strfry-policies/scripts/npm.ts

33 lines
769 B
TypeScript
Raw Normal View History

2023-04-17 01:26:32 +00:00
import { build, emptyDir } from 'https://deno.land/x/dnt@0.34.0/mod.ts';
2023-04-16 16:51:35 +00:00
await emptyDir('./npm');
await build({
entryPoints: ['./mod.ts'],
outDir: './npm',
shims: {
deno: true,
2023-04-17 01:26:32 +00:00
undici: true,
2023-04-16 16:51:35 +00:00
},
package: {
name: 'strfry-policies',
version: Deno.args[0],
2023-04-17 01:30:58 +00:00
description: 'Configurable policies for the strfry Nostr relay.',
2023-04-16 16:51:35 +00:00
license: 'Unlicense',
repository: {
type: 'git',
url: 'git+https://gitlab.com/soapbox-pub/strfry-policies.git',
},
bugs: {
url: 'https://gitlab.com/soapbox-pub/strfry-policies/-/issues',
},
},
2023-04-17 01:26:32 +00:00
typeCheck: false,
test: false,
scriptModule: false,
2023-04-16 16:51:35 +00:00
postBuild() {
Deno.copyFileSync('LICENSE', 'npm/LICENSE');
Deno.copyFileSync('README.md', 'npm/README.md');
},
});