mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-03 15:59:57 +00:00
Merge branch 'codemirror6' into codemirror6_take2
This commit is contained in:
commit
9135a85de4
8 changed files with 1129 additions and 1900 deletions
dev/build
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const esbuild = require('esbuild');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// Check if we're building for production
|
||||
|
@ -9,20 +8,19 @@ const path = require('path');
|
|||
const isProd = process.argv[2] === 'production';
|
||||
|
||||
// Gather our input files
|
||||
const jsInDir = path.join(__dirname, '../../resources/js');
|
||||
const jsInDirFiles = fs.readdirSync(jsInDir, 'utf8');
|
||||
const entryFiles = jsInDirFiles
|
||||
.filter(f => f.endsWith('.js') || f.endsWith('.mjs'))
|
||||
.map(f => path.join(jsInDir, f));
|
||||
const entryPoints = {
|
||||
app: path.join(__dirname, '../../resources/js/app.js'),
|
||||
code: path.join(__dirname, '../../resources/js/code/index.mjs'),
|
||||
};
|
||||
|
||||
// Locate our output directory
|
||||
const outDir = path.join(__dirname, '../../public/dist');
|
||||
const outdir = path.join(__dirname, '../../public/dist');
|
||||
|
||||
// Build via esbuild
|
||||
esbuild.build({
|
||||
bundle: true,
|
||||
entryPoints: entryFiles,
|
||||
outdir: outDir,
|
||||
entryPoints,
|
||||
outdir,
|
||||
sourcemap: true,
|
||||
target: 'es2020',
|
||||
mainFields: ['module', 'main'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue