mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Adopt esbuild in monaco-html
This commit is contained in:
parent
9a52545094
commit
c8344afb94
9 changed files with 119 additions and 151 deletions
|
|
@ -6,6 +6,7 @@
|
|||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const cp = require('child_process');
|
||||
const esbuild = require('esbuild');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '..');
|
||||
|
||||
|
|
@ -154,6 +155,21 @@ function dts(_source, _destination, namespace) {
|
|||
}
|
||||
exports.dts = dts;
|
||||
|
||||
/**
|
||||
* @param {import('esbuild').BuildOptions} options
|
||||
*/
|
||||
function build(options) {
|
||||
esbuild.build(options).then((result) => {
|
||||
if (result.errors.length > 0) {
|
||||
console.error(result.errors);
|
||||
}
|
||||
if (result.warnings.length > 0) {
|
||||
console.error(result.warnings);
|
||||
}
|
||||
});
|
||||
}
|
||||
exports.build = build;
|
||||
|
||||
function getGitVersion() {
|
||||
const git = path.join(REPO_ROOT, '.git');
|
||||
const headPath = path.join(git, 'HEAD');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue