diff options
Diffstat (limited to 'esbuild.mjs')
-rwxr-xr-x | esbuild.mjs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/esbuild.mjs b/esbuild.mjs index ae940b586..b29f15621 100755 --- a/esbuild.mjs +++ b/esbuild.mjs | |||
@@ -4,11 +4,11 @@ import { sassPlugin } from 'esbuild-sass-plugin'; | |||
4 | import { copy } from 'esbuild-plugin-copy'; | 4 | import { copy } from 'esbuild-plugin-copy'; |
5 | import glob from 'tiny-glob'; | 5 | import glob from 'tiny-glob'; |
6 | import livereload from 'gulp-livereload'; | 6 | import livereload from 'gulp-livereload'; |
7 | import * as fs from 'fs'; | 7 | import * as fs from 'node:fs'; |
8 | import * as buildInfo from 'preval-build-info'; | 8 | import * as buildInfo from 'preval-build-info'; |
9 | import fsPkg from 'fs-extra'; | 9 | import fsPkg from 'fs-extra'; |
10 | import chalk from 'chalk'; | 10 | import chalk from 'chalk'; |
11 | import { performance } from 'perf_hooks'; | 11 | import { performance } from 'node:perf_hooks'; |
12 | import moment from 'moment'; | 12 | import moment from 'moment'; |
13 | 13 | ||
14 | const { log } = console; | 14 | const { log } = console; |
@@ -80,11 +80,11 @@ const runEsbuild = async () => { | |||
80 | 80 | ||
81 | const myArgs = process.argv.slice(2); | 81 | const myArgs = process.argv.slice(2); |
82 | const isDev = myArgs.includes('--watch'); | 82 | const isDev = myArgs.includes('--watch'); |
83 | log(chalk.blue(`Starting with args`), myArgs); | 83 | log(chalk.blue('Starting with args'), myArgs); |
84 | 84 | ||
85 | if (fs.existsSync(outDir)) { | 85 | if (fs.existsSync(outDir)) { |
86 | fs.rmSync(outDir, { force: true, recursive: true }); | 86 | fs.rmSync(outDir, { force: true, recursive: true }); |
87 | log(chalk.blue(`Cleaning`), outDir); | 87 | log(chalk.blue('Cleaning'), outDir); |
88 | } | 88 | } |
89 | copyManualAssets(); | 89 | copyManualAssets(); |
90 | 90 | ||
@@ -112,7 +112,7 @@ const runEsbuild = async () => { | |||
112 | if (error) { | 112 | if (error) { |
113 | log(chalk.red(`watch build failed: ${error}`)); | 113 | log(chalk.red(`watch build failed: ${error}`)); |
114 | } else { | 114 | } else { |
115 | log(chalk.blue(`watch build success:`), result); | 115 | log(chalk.blue('watch build success:'), result); |
116 | livereload.reload(); | 116 | livereload.reload(); |
117 | } | 117 | } |
118 | }, | 118 | }, |