diff options
Diffstat (limited to 'build/tasks/minify.js')
-rw-r--r-- | build/tasks/minify.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/build/tasks/minify.js b/build/tasks/minify.js index 9aacc31e8..8c536c1ef 100644 --- a/build/tasks/minify.js +++ b/build/tasks/minify.js @@ -1,15 +1,15 @@ "use strict"; const swc = require( "@swc/core" ); -const fs = require( "fs" ); -const path = require( "path" ); +const fs = require( "node:fs/promises" ); +const path = require( "node:path" ); const processForDist = require( "./dist" ); const getTimestamp = require( "./lib/getTimestamp" ); const rjs = /\.js$/; module.exports = async function minify( { filename, dir, esm } ) { - const contents = await fs.promises.readFile( path.join( dir, filename ), "utf8" ); + const contents = await fs.readFile( path.join( dir, filename ), "utf8" ); const version = /jQuery JavaScript Library ([^\n]+)/.exec( contents )[ 1 ]; const { code, map: incompleteMap } = await swc.minify( @@ -48,11 +48,11 @@ module.exports = async function minify( { filename, dir, esm } ) { } ); await Promise.all( [ - fs.promises.writeFile( + fs.writeFile( path.join( dir, minFilename ), code ), - fs.promises.writeFile( + fs.writeFile( path.join( dir, mapFilename ), map ) |