summaryrefslogtreecommitdiffstatshomepage
path: root/core/scripts/js/jqueryui-check.js
diff options
context:
space:
mode:
authorcatch <catch@35733.no-reply.drupal.org>2020-10-21 11:41:33 +0100
committercatch <catch@35733.no-reply.drupal.org>2020-10-21 11:41:33 +0100
commit89f6acb734e93d22468e25f59e0bf59ca2d8aaa5 (patch)
treed594c0079c7c557feb5fbcbb76c3a67eca744d8f /core/scripts/js/jqueryui-check.js
parentda115f6ccffb6c9aeb368b56b8664332968a65e6 (diff)
downloaddrupal-89f6acb734e93d22468e25f59e0bf59ca2d8aaa5.tar.gz
drupal-89f6acb734e93d22468e25f59e0bf59ca2d8aaa5.zip
Issue #3174884 by raman.b, alexpott, lauriii, zrpnr, nod_: Update yarn dependencies for Drupal 9.1.0
Diffstat (limited to 'core/scripts/js/jqueryui-check.js')
-rw-r--r--core/scripts/js/jqueryui-check.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/core/scripts/js/jqueryui-check.js b/core/scripts/js/jqueryui-check.js
index b1600ae46ac6..3b7c97cc5518 100644
--- a/core/scripts/js/jqueryui-check.js
+++ b/core/scripts/js/jqueryui-check.js
@@ -7,17 +7,18 @@ module.exports = filePath => {
log(`'${filePath}' is being checked.`);
// Transform the file.
const file = fs.readFileSync(filePath, 'utf-8');
- const result = Terser.minify(file);
- const fileName = filePath.slice(0, -3);
- fs.readFile(`${fileName}-min.js`, function read(err, data) {
- if (err) {
- log(chalk.red(err));
- process.exitCode = 1;
- return;
- }
- if (result.code !== data.toString()) {
- log(chalk.red(`'${filePath}' is not updated.`));
- process.exitCode = 1;
- }
+ Terser.minify(file).then((result) => {
+ const fileName = filePath.slice(0, -3);
+ fs.readFile(`${fileName}-min.js`, function read(err, data) {
+ if (err) {
+ log(chalk.red(err));
+ process.exitCode = 1;
+ return;
+ }
+ if (result.code !== data.toString()) {
+ log(chalk.red(`'${filePath}' is not updated.`));
+ process.exitCode = 1;
+ }
+ });
});
};