From f9b16d37549677526bad0095ad4833df5c2c359b Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Sat, 2 Mar 2019 20:50:00 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20Drop=20support=20for=C2=A0Node=C2=A0} - */ async function componentsJsonToJs() { const data = await componentsPromise; const js = `var components = ${JSON.stringify(data)};\nif (typeof module !== 'undefined' && module.exports) { module.exports = components; }`; - // Node's `util.promisify()` requires Node 8+ - return new Promise((resolve, reject) => { - fs.writeFile(paths.componentsFileJS, js, err => err ? reject(err) : resolve()); - }); + return util.promisify(fs.writeFile)(paths.componentsFileJS, js); } function watchComponentsAndPlugins() {