chore: Migrated build script template to v3
This commit is contained in:
parent
25bbca5fb2
commit
64a627a458
1 changed files with 6 additions and 6 deletions
|
@ -1,20 +1,20 @@
|
||||||
/* This script will build the package with esbuild */
|
/* This script will build the package with esbuild */
|
||||||
import esbuild from 'esbuild'
|
import esbuild from 'esbuild'
|
||||||
import pkg from './package.json' assert { type: 'json' }
|
import { version, name, description, author, license } from './package.json' assert { type: 'json' }
|
||||||
|
|
||||||
// Create banner based on package info
|
// Create banner based on package info
|
||||||
const banner = `/**
|
const banner = `/**
|
||||||
* ${pkg.name} | v${pkg.version}
|
* ${name} | v${version}
|
||||||
* ${pkg.description}
|
* ${description}
|
||||||
* (c) ${new Date().getFullYear()} ${pkg.author}
|
* (c) ${new Date().getFullYear()} ${author}
|
||||||
* @license ${pkg.license}
|
* @license ${license}
|
||||||
*/`
|
*/`
|
||||||
|
|
||||||
// Shared esbuild options
|
// Shared esbuild options
|
||||||
const options = {
|
const options = {
|
||||||
banner: { js: banner },
|
banner: { js: banner },
|
||||||
bundle: true,
|
bundle: true,
|
||||||
entryPoints: ['src/index.js'],
|
entryPoints: ['src/index.mjs'],
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
outfile: 'dist/index.mjs',
|
outfile: 'dist/index.mjs',
|
||||||
external: ["@freesewing"],
|
external: ["@freesewing"],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue