0
0
Fork 0
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:
Dan Brown 2023-02-17 21:28:23 +00:00
commit 9135a85de4
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
8 changed files with 1129 additions and 1900 deletions
dev/build

View file

@ -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'],