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 — lowcode-engine/modules/code-generator/scripts/build.js at main · 2018Cool/lowcode-engine Expand file tree/ Copy pathbuild.jsMore file actions 75 lines (70 loc) · 2.05 KB / Copy pathbuild.jsFile metadata and controls75 lines (70 loc) · 2.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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 /* eslint-disable no-console */ /* eslint-disable @typescript-eslint/no-require-imports */ const _ = require('lodash'); const esbuild = require('esbuild'); const concurrently = require('concurrently'); const argv = require('yargs-parser')(process.argv.slice(2)); const packageJson = require('../package.json'); if (!argv.format) { buildAll(); } else { buildFormat(argv.format, argv.out || 'dist'); } function buildAll() { concurrently( [ { name: 'build:types', command: 'sh scripts/build-types' }, { name: 'build:cjs', command: 'node scripts/build --format=cjs --out=lib' }, { name: 'build:esm', command: 'node scripts/build --format=esm --out=es' }, { name: 'build:standalone', command: 'node scripts/build-standalone' }, { name: 'build:standalone-worker', command: 'node scripts/build-standalone-worker' }, { name: 'build:standalone-loader', command: 'node scripts/build-standalone-loader' }, { name: 'build:cli', command: 'node scripts/build-cli' }, ], { prefix: 'name', killOthers: ['failure'], restartTries: 0, }, ).then( () => { console.log('all done.'); }, () => { process.exit(1); }, ); } function buildFormat(format, outDir) { try { console.log('building %s...', format); const startTime = Date.now(); const result = esbuild.buildSync({ entryPoints: ['src/index.ts'], outfile: `${outDir}/index.js`, bundle: true, platform: 'node', target: ['node10'], format, sourcemap: true, sourcesContent: true, define: {}, treeShaking: true, external: _.keys(packageJson.dependencies), minify: false, legalComments: 'external', }); if (result.errors.length > 0) { throw result.errors; } if (result.warnings.length > 0) { result.warnings.forEach((warnings) => { console.warn(warnings); }); } console.log('built %s in %ds', format, ((Date.now() - startTime) / 1000).toFixed(2)); } catch (e) { console.error(e); process.exit(1); } } |
| You are visitor 01402792 — 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. |