Skip to content

Commit

Permalink
test: add build scripts for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wd-David committed Jun 18, 2022
1 parent f3f96fd commit 3e0c944
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/buildScripts/buildJS.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/node
const { build } = require('esbuild')
const esbuildPluginPino = require('../../dist')

const distFolder = 'test/dist'

build({
entryPoints: {
first: './test/fixtures/first.js',
'abc/cde/second': './test/fixtures/second.js'
},
logLevel: 'info',
outdir: distFolder,
bundle: true,
platform: 'node',
format: 'cjs',
plugins: [esbuildPluginPino({ transports: ['pino-pretty'] })]
}).catch(() => process.exit(1))
14 changes: 14 additions & 0 deletions test/buildScripts/buildTS.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { build } from 'esbuild'
import esbuildPluginPino from '../../dist'

const distFolder = 'test/dist'

build({
entryPoints: ['./test/fixtures/third.ts'],
logLevel: 'info',
outdir: distFolder,
bundle: true,
platform: 'node',
format: 'cjs',
plugins: [esbuildPluginPino({ transports: ['pino-loki', 'pino-pretty'] })]
}).catch(() => process.exit(1))

0 comments on commit 3e0c944

Please sign in to comment.