Closed budda closed 8 years ago
If it is of use:
$ yo --version
1.7.0
Not sure how to tell what version of the Phaser-plus generator i'm using!
Newer versions of the generator rely on a hidden .yo-rc.json
config file. Such file is required by Yeoman to properly determine where the project root is located. At the moment, only info about the source structure is stored there, and these are read by the subgenerators when writing the files to their proper locations.
In your case, the config file of your project is missing, much probably because it was created by the old Slush generator — projects created with this Yeoman generator always have one. The subgenerator should work as expected after you create one. Currently, a .yo-rc.json
file looks like in the following sample. Remember to adjust the file paths to match your project. If you have other projects created with slush-phaser-plus, you'll have to make the same adjustments for compatibility with Yeoman.
{
"generator-phaser-plus": {
"dirs": {
"objects": "src/objects",
"plugins": "src/plugins",
"states": "src/states"
},
"states-module": "src/states.js"
}
}
The fix is ready but planned for the next release, along several other changes.
okay i created the missing file and populated it with paths to match what had previously been created by your generator:
{
"generator-phaser-plus": {
"dirs": {
"objects": "src/scripts/app/objects",
"plugins": "src/scripts/app/plugins",
"states": "src/scripts/app/states"
},
"states-module": "src/scripts/states.js"
}
}
Worked fine, thanks for the info!
When trying to generate an object i get: