asacolips-projects / boilerplate

Boilerplate system for FoundryVTT to use as a starting point for your own system's development. Follow along with the [accompanying tutorial](https://foundryvtt.wiki/en/development/guides/SD-tutorial) on the wiki.
Other
22 stars 11 forks source link

[v12 Branch] The generator uses the System ID var which can have dashes for the global scope var #41

Open philote opened 3 months ago

philote commented 3 months ago

When running the generator it uses the System ID that the users enters for the globalThis. in the main mjs file. Since the system id can have dashes but the javascript var cannot, there needs to be some sanitizing or using a different input for the globalThis var name.

This is for the v12 Branch of Boilerplate.

JPMeehan commented 2 months ago

More broadly: Probably need to do some input validation on these things; just had a user who tried to name their system "2d100" which caused problems because JS doesn't like it when variable names start with numbers.