andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.53k stars 305 forks source link

`gulp -m all -l all build:dev` fails on OS that cares about case in file names #654

Open jikamens opened 4 years ago

jikamens commented 4 years ago
[11:32:34] Using gulpfile /tmp/Sugar/gulpfile.js
[11:32:34] Starting 'build:dev'...
[11:32:34] Exporting: sugar-custom.js...
[11:32:34] Cannot find locale zh-CN!
[11:32:34] Exiting...

This fixes it for me:

diff --git a/gulpfile.js b/gulpfile.js
index ee3c7aa4..9b9d2e63 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -793,7 +793,7 @@ function getLocalePaths(l) {
   var codes = getLocaleCodes(l);

   function getPath(l) {
-    return path.join('lib', 'locales', l.toLowerCase() + '.js');
+    return path.join('lib', 'locales', l + '.js');
   }

   codes.forEach(function(n) {