pwa-builder / PWABuilder-CLI

Node.js tool for App Generation
Other
1.63k stars 142 forks source link

Can't create an app name with space between words or a non English name #305

Closed NoamPaz closed 5 years ago

NoamPaz commented 6 years ago

Steps: 1) Set short_name as "My App" in the manifest.json 2) Create an android app. I didn't try IOS, but seems like utils.sanitizeName will replace all spaces for every platform. 3) App name is MyApp instead of My App. 4) If App name is a non English word I get the default value (myPWABuilderApp).

Here is the problematic line in the utils: sanitizedName = sanitizedName.replace(/[^A-Za-z0-9.]/g, '');

lucaasrojas commented 5 years ago

@NoamPaz I opened a new PR with a fix to this problem. The fix allows to set a short_name with spaces and in Spanish.

kbrons commented 5 years ago

Fix already merged, will be live on the next pwabuilder-lib release. In the meantime, you can clone this and the pwabuilder-lib repository locally, pack and install the fixed version of the of the lib to your copy of the CLI and generate your app there.