summaryrefslogtreecommitdiffhomepage
path: root/packages/server/build_npm.ts
blob: cd3bb72edf93a8d1e9b0b93f97dcc62ae6fa2245 (plain)
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
import { build, emptyDir } from 'https://deno.land/x/dnt@0.38.0/mod.ts';

const outDir = './npm';

await emptyDir(outDir);

await build({
  entryPoints: [
    './src/index.ts',
    { name: 'helpers', path: './src/helpers/index.ts' },
  ],
  outDir,
  shims: {
    deno: "dev",
  },
  test: false,
  // package.json values
  package: {
    name: '@simplewebauthn/server',
    // version: Deno.args[0],
    version: '7.4.0',
    description: 'SimpleWebAuthn for Servers',
    license: 'MIT',
    author: 'Matthew Miller <matthew@millerti.me>',
    repository: {
      type: 'git',
      url: 'https://github.com/MasterKale/SimpleWebAuthn.git',
      directory: 'packages/server',
    },
    homepage: 'https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/server#readme',
    publishConfig: {
      access: 'public',
    },
    bugs: {
      url: 'https://github.com/MasterKale/SimpleWebAuthn/issues',
    },
    keywords: [
      'typescript',
      'webauthn',
      'passkeys',
      'fido',
      'node',
    ],
  },
  // Map from Deno package to NPM package for Node build
  mappings: {
    'https://deno.land/x/b64@1.1.27/src/base64.js': {
      name: '@hexagon/base64',
      version: '^1.1.25'
    }
  }
});

// Deno.copyFileSync('LICENSE', 'npm/LICENSE');
Deno.copyFileSync('README.md', `${outDir}/README.md`);