getflywheel / create-local-addon

A generator to assist in the development of new Local add-ons. Generates a basic add-on to act as a starting point for development.
15 stars 5 forks source link

Using product name from command call doesn't work #5

Open bgturner opened 3 years ago

bgturner commented 3 years ago

When running in non-interactive mode, for example, like this:

npx create-local-addon "My Product Name" directory-name

The productname argument isn't correctly parsed, with the second word of the string being interpreted as the directory name. See this screenshot for more details:

image

Note: Running the command in interactive mode (ie, when create-local-addon prompts you for productname and directoryname) does work.

ethan309 commented 3 years ago

That is really odd. I don't seem to get that issue on my end with the same steps. A check of the package.json confirms the directory and package are named correctly, too. Could it be a quote issue — like using directional quotation marks instead of standard/straight quotes? I do not believe I tested it with these variations, but it was just a random thought.

I have included my output below:

Screen Shot 2021-01-25 at 17 08 40

(I also tried running npx create-local-addon "My directory-name Name" directory-name-next just to see if the directory name being included in the name would somehow trip it up, but it worked fine.)