jozefizso / generator-license

Yeoman Generator - License
MIT License
59 stars 20 forks source link

feat(package): No package.json unless it already exists. #17

Closed hutson closed 9 years ago

hutson commented 9 years ago

Do not scaffold a package.json file unless it already exists.

This will allow projects, such as Python projects, to scaffold a LICENSE file without inheriting a package.json file, which would make no sense for that type of project.

BREAKING CHANGE: Will no longer scaffold package.json file unless it already exists.

Closes #15

hutson commented 9 years ago

Sorry. I didn't run the tests first. I need to add test cases to handle the lack of generating a package.json file.

hutson commented 9 years ago

Swapped out fs.access for fs.exists to make feature compatible with Node 0.10.

Added inTmpDir to scaffold package.json file. Existing tests now pass.

I still need to add test for case where no package.json file exists.

hutson commented 9 years ago

I believe I'm done.

I've added a test to verify package.json is updated if it already exists. Also updated existing test-app tests to exclude package.json tests unless required.

Please let me know if you feel I can improve on the changes.

jozefizso commented 9 years ago

Thanks, looks good to me.