Skip to content

Commit

Permalink
#4150 - Upgrade dependencies
Browse files Browse the repository at this point in the history
- esbuild 0.18.19 -> 0.19.2
- esbuild-sass-plugin 2.10.0 -> 2.12.0
  • Loading branch information
reckart committed Aug 23, 2023
1 parent 4bc20e6 commit d9ee98c
Show file tree
Hide file tree
Showing 31 changed files with 1,768 additions and 1,674 deletions.
225 changes: 121 additions & 104 deletions inception/inception-bootstrap/src/main/ts_template/package-lock.json

Large diffs are not rendered by default.

48 changes: 27 additions & 21 deletions inception/inception-brat-editor/src/main/ts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const argv = yargs(hideBin(process.argv)).argv
const packagePath = 'de/tudarmstadt/ukp/clarin/webanno/brat/resource'

let outbase = `../../../target/js/${packagePath}`
if (argv.live) {
outbase = `../../../target/classes/${packagePath}`
}

const defaults = {
bundle: true,
Expand All @@ -53,27 +56,30 @@ const defaults = {
]
}

fs.mkdirsSync(`${outbase}`)
fs.emptyDirSync(outbase)

if (argv.live) {
defaults.watch = {
onRebuild (error, result) {
if (error) console.error('watch build failed:', error)
else console.log('watch build succeeded:', result)
}
}
outbase = `../../../target/classes/${packagePath}`
const context1 = await esbuild.context(Object.assign({
entryPoints: ['src/brat.ts'],
outfile: `${outbase}/brat.min.js`,
globalName: 'Brat'
}, defaults))
const context2 = await esbuild.context(Object.assign({
entryPoints: ['src/brat_curation.ts'],
outfile: `${outbase}/brat_curation.min.js`,
globalName: 'BratCuration'
}, defaults))
await Promise.all([context1.watch(), context2.watch()])
} else {
fs.emptyDirSync(outbase)
esbuild.build(Object.assign({
entryPoints: ['src/brat.ts'],
outfile: `${outbase}/brat.min.js`,
globalName: 'Brat'
}, defaults))
esbuild.build(Object.assign({
entryPoints: ['src/brat_curation.ts'],
outfile: `${outbase}/brat_curation.min.js`,
globalName: 'BratCuration'
}, defaults))
}
fs.mkdirsSync(`${outbase}`)

esbuild.build(Object.assign({
entryPoints: ['src/brat.ts'],
outfile: `${outbase}/brat.min.js`,
globalName: 'Brat'
}, defaults))

esbuild.build(Object.assign({
entryPoints: ['src/brat_curation.ts'],
outfile: `${outbase}/brat_curation.min.js`,
globalName: 'BratCuration'
}, defaults))
Loading

0 comments on commit d9ee98c

Please sign in to comment.