From 8a999b1a2fbb23f77a4519ea31561b94443ea756 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Thu, 25 Mar 2021 23:12:32 -0400 Subject: [PATCH] inline camelCase --- Gulpfile.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gulpfile.mjs b/Gulpfile.mjs index 21fdd85839a3..ec8fa1f6e014 100644 --- a/Gulpfile.mjs +++ b/Gulpfile.mjs @@ -8,7 +8,6 @@ import through from "through2"; import chalk from "chalk"; import newer from "gulp-newer"; import babel from "gulp-babel"; -import camelCase from "lodash/camelCase.js"; import fancyLog from "fancy-log"; import filter from "gulp-filter"; import revertPath from "gulp-revert-path"; @@ -162,7 +161,9 @@ function generateStandalone() { let allList = ""; for (const plugin of pluginConfig) { - const camelPlugin = camelCase(plugin); + const camelPlugin = plugin.replace(/-([a-z])/g, c => + c[1].toUpperCase() + ); imports += `import ${camelPlugin} from "@babel/plugin-${plugin}";`; list += `${camelPlugin},`; allList += `"${plugin}": ${camelPlugin},`;