From cef68084a2670d797559c2fd4a36825be67b7729 Mon Sep 17 00:00:00 2001 From: Pagan Gazzard Date: Thu, 9 Jan 2025 13:14:52 +0000 Subject: [PATCH] Use for-of loops in preference of lodash `_.forEach` Change-type: patch --- Gruntfile.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gruntfile.ts b/Gruntfile.ts index 74f3e1228..31368f659 100644 --- a/Gruntfile.ts +++ b/Gruntfile.ts @@ -13,7 +13,7 @@ const serverConfigs = { server: serverConfig, }; -_.forEach(serverConfigs, (config) => { +for (const config of Object.values(serverConfigs)) { config.optimization = { minimizer: [ new TerserPlugin({ @@ -32,7 +32,7 @@ _.forEach(serverConfigs, (config) => { }), ], }; -}); +} export = (grunt: typeof Grunt) => { grunt.initConfig({ @@ -96,8 +96,8 @@ export = (grunt: typeof Grunt) => { }, rename: (() => { - const renames: _.Dictionary<{ src: string; dest: string }> = {}; - _.forEach(serverConfigs, (_config, task) => { + const renames: Record = {}; + for (const task of Object.keys(serverConfigs)) { renames[task] = { src: 'out/pine.js', dest: `out/pine-${task}-<%= grunt.option('version') %>.js`, @@ -106,7 +106,7 @@ export = (grunt: typeof Grunt) => { src: 'out/pine.js.map', dest: `out/pine-${task}-<%= grunt.option('version') %>.js.map`, }; - }); + } return renames; })(),