GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — java-runner/esbuild.config.js at main · ChrisMayfield/java-runner Expand file tree/ Copy pathesbuild.config.jsMore file actions 44 lines (40 loc) · 1.05 KB / Copy pathesbuild.config.jsFile metadata and controls44 lines (40 loc) · 1.05 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 const esbuild = require('esbuild'); const fs = require('fs'); const path = require('path'); const isWatch = process.argv.includes('--watch'); const cssPlugin = { name: 'css-bundle', setup(build) { build.onEnd(() => { const cssPath = path.join(__dirname, 'src/styles/main.css'); if (fs.existsSync(cssPath)) { fs.copyFileSync(cssPath, path.join(__dirname, 'dist/javarunner.css')); } }); }, }; const config = { entryPoints: ['src/index.ts'], bundle: true, outfile: 'dist/javarunner.js', format: 'iife', globalName: 'JavaRunner', sourcemap: true, minify: !isWatch, target: ['es2020'], plugins: [cssPlugin], define: { 'process.env.NODE_ENV': isWatch ? '"development"' : '"production"', }, }; if (isWatch) { esbuild.context(config).then(ctx => { ctx.watch(); console.log('Watching for changes...'); }); } else { esbuild.build(config).then(result => { const stats = fs.statSync('dist/javarunner.js'); console.log(`Built dist/javarunner.js (${(stats.size / 1024).toFixed(1)} KB)`); }); } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |