create-stencil icon indicating copy to clipboard operation
create-stencil copied to clipboard

Support non-alphanumeric characters in project name

Open sandwichnyc opened this issue 4 years ago • 3 comments

Stencil version:

 @stencil/[email protected]

I'm submitting a:

[ ] bug report [x] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior: When installing Stencil, if you create a package name that contains non-alphanumeric characters, the install fails:

✖ Project name "@blah/my-project" is not valid. It must be a kebab-case name without spaces.

Expected behavior: The project name should be able to support prefixes (such as @stencil/core) since this is a common convention.

Steps to reproduce:

Related code:

// insert any relevant code here

Other information:

sandwichnyc avatar Jul 15 '21 17:07 sandwichnyc

The ‘project name’ doesn’t really relate to the package name. It’s just used to name folders and some entry files

johnjenkins avatar Jul 15 '21 18:07 johnjenkins

The ‘project name’ doesn’t really relate to the package name. It’s just used to name folders and some entry files

Sorry, I should clarify this more. In our case, we have a root package (it's a monorepo) and it's called, for example, @blah/my-package. If I run the Stencil init in that root package and give it a kebab case name such as my-stencil-project, it creates a directory within that root package called my-stencil-project and it has its own package.json. So that makes sense. Is it possible though, to install Stencil such that it's at the root directory level and not in its own sub-directory? I tried moving files around manually and adding all of the Stencil stuff to the root package.json, but that doesn't work because of the format of that @blah/my-package name.

sandwichnyc avatar Jul 15 '21 21:07 sandwichnyc

I apologize it took so long for someone on the team to respond to this request. I'm going to label it to be ingested into our backlog/discussed with the team

rwaskiewicz avatar May 06 '22 20:05 rwaskiewicz