summaryrefslogtreecommitdiffstats
path: root/build/generate-images.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/generate-images.js')
-rwxr-xr-xbuild/generate-images.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/build/generate-images.js b/build/generate-images.js
index bea36321e3..d82f21564f 100755
--- a/build/generate-images.js
+++ b/build/generate-images.js
@@ -1,12 +1,11 @@
-#!/usr/bin/env node
-'use strict';
-
-const imageminZopfli = require('imagemin-zopfli');
-const {optimize, extendDefaultPlugins} = require('svgo');
-const {fabric} = require('fabric');
-const {readFile, writeFile} = require('fs').promises;
-const {resolve} = require('path');
+import imageminZopfli from 'imagemin-zopfli';
+import {optimize, extendDefaultPlugins} from 'svgo';
+import {fabric} from 'fabric';
+import {readFile, writeFile} from 'fs/promises';
+import {resolve, dirname} from 'path';
+import {fileURLToPath} from 'url';
+const __dirname = dirname(fileURLToPath(import.meta.url));
const logoFile = resolve(__dirname, '../assets/logo.svg');
function exit(err) {