Commits
Tarun Sukhani authored 7bdde59b9ec
feat: playNewApp derives identifier slug from -Pname (PF-90)
User feedback: -Pname can be multi-word with capitals (e.g.
\"My Testing App\") which is correct for application.name in
conf/application.conf, but rootProject.name in settings.gradle.kts
needs a single lowercase identifier.
Two derived values from -Pname:
- displayName: as-given. Used for application.name (Play renders this
in welcome page, log lines, error pages — wants the human form).
- identifier: lowercased + alphanumeric-only filter. Used for:
* rootProject.name in settings.gradle.kts
* default dest dir name (cwd/<identifier>)
* package.json name field for the Nuxt frontend (npm name validation
rejects spaces and uppercase)
For \"My Testing App\":
application.conf: application.name=My Testing App
settings.gradle.kts: rootProject.name = \"mytestingapp\"
default dest: /cwd/mytestingapp
package.json: \"name\": \"mytestingapp-frontend\"
default.vue h1: My Testing App ← display form preserved
Nuxt-skel changes: package.json's \"name\" field switched from
%APPLICATION_NAME% to %APPLICATION_IDENTIFIER% so it gets the slug
form. Other %APPLICATION_NAME% references (default.vue's h1) keep the
display form. setupNuxtFrontend now does both substitutions in one pass.
Edge case: if -Pname contains no [a-z0-9] characters (e.g.
-Pname=\"!!!\"), playNewApp fails with a clear message rather than
producing an empty rootProject.name.
Verified: -Pname=\"My Testing App\" produces correct values across all
five places, dest at cwd/mytestingapp, frontend ApiController moved
into app/controllers/, /api/status route patched into conf/routes.