How does Ember CLI figure out project name / module prefix for existing Ember projects?

Hey,

I’ve successfully migrated my project called "ShareDrop" to Ember CLI, but whenever I’m upgrading Ember CLI and run ember init, it generates project name and module prefix as "share-drop". Where does it take this name from? The project is in a folder called "sharedrop", but I’m not sure it’s important.

Assuming I change the name to “share-drop”, what will be the name of global variable created by ember-export-application-global - window["share-drop"]?

CamelCase becomes dash-case and vice versa. I don’t think the directory name matters, I think it comes from the modulePrefix setting in config/environment.js.

Thanks. Mystery solved - it takes the name from "name" property in package.json file. I changed it to FooBar and it started generating foo-bar everywhere, including newly generated package.json file… I guess using camel case for project name is not encouraged :smile:

Ah, I did consider package.json but I thought, no, that doesn’t make sense! hehe glad you figured it out