deno.land / x / domain_functions@v1.2.0 / scripts / build-npm.ts
1234567891011121314151617181920212223242526272829303132333435363738394041424344// ex. scripts/build_npm.tsimport { build, emptyDir } from 'https://deno.land/x/dnt@0.25.2/mod.ts'import pkg from '../package.json' assert { type: 'json' }
await emptyDir('./npm')
await build({ scriptModule: 'cjs', typeCheck: false, declaration: true, entryPoints: ['./src/index.ts'], outDir: './npm', shims: { deno: true, undici: true, }, mappings: { 'https://deno.land/x/zod@v3.19.1/mod.ts': { name: 'zod', version: '^3.19.1', }, 'https://deno.land/x/deno_qs@0.0.1/mod.ts': { name: 'qs', version: '^6.10.3', }, }, package: { name: 'domain-functions', version: pkg.version, description: 'Decouple your business logic from your controllers. With first-class type inference from end to end.', license: 'MIT', author: 'Seasoned Software', bugs: { url: 'https://github.com/SeasonedSoftware/domain-functions/issues', }, homepage: 'https://github.com/SeasonedSoftware/domain-functions', },})
// post build stepsDeno.copyFileSync('LICENSE', 'npm/LICENSE')Deno.copyFileSync('README.md', 'npm/README.md')
Version Info