e6a3e5c3ea
* move core into repo, apps into apps folder, update tests * Update scripts for build:core * improve scripts * remove noise from www * Update .gitignore * Fix focus bug * add ci test script * Update main.yml
31 lines
760 B
JavaScript
31 lines
760 B
JavaScript
/* eslint-disable */
|
||
const esbuild = require('esbuild')
|
||
const pkg = require('../package.json')
|
||
|
||
async function main() {
|
||
esbuild.build({
|
||
entryPoints: ['./src/index.ts'],
|
||
outdir: 'dist/esm',
|
||
minify: false,
|
||
bundle: true,
|
||
format: 'esm',
|
||
target: 'es6',
|
||
tsconfig: './tsconfig.build.json',
|
||
jsxFactory: 'React.createElement',
|
||
jsxFragment: 'React.Fragment',
|
||
external: Object.keys(pkg.dependencies).concat(Object.keys(pkg.peerDependencies)),
|
||
incremental: true,
|
||
sourcemap: true,
|
||
watch: {
|
||
onRebuild(error) {
|
||
if (error) {
|
||
console.log(`× ${pkg.name}: An error in prevented the rebuild.`)
|
||
return
|
||
}
|
||
console.log(`✔ ${pkg.name}: Rebuilt.`)
|
||
},
|
||
},
|
||
})
|
||
}
|
||
|
||
main()
|