recital / exporters / ink / build.js
build.js
Raw
const esbuild = require('esbuild')

esbuild
	.build({
		entryPoints: ['src/index.ts'],
		bundle: true,
		platform: 'node',
		external: ['@a-morphous/recital', '@a-morphous/recital-ext-common-commands'],
		outfile: 'dist/stage-ink.js',
	})
	.catch(() => process.exit(1))

esbuild
	.build({
		entryPoints: ['src/index.ts'],
		bundle: true,
		format: 'esm',
		external: ['@a-morphous/recital', '@a-morphous/recital-ext-common-commands'],
		outfile: 'dist/stage-ink.module.js',
	})
	.catch(() => process.exit(1))

esbuild.build({
	entryPoints: ['cli.js'],
	bundle: true,
	platform: 'node',
	outfile: 'dist/cli.js',
}) // no external so we can use it right away.