balderdashy/sails — pull request #574 by conceptualitis (2013-07-14 10:49:10+00:00)
Title: When installing in an existing directory, take the existing settings in package.json and merge them into the generated file

I'm relatively new to Node so I've been playing with a few different frameworks for an app I'm building. Consequently, I had both an existing directory and an existing `package.json` file containing some devDependencies and a few other attributes that I'd like to keep. Ideally, for me, Sails would see my package.json and merge it into its own defaults. So that's what I wrote!

I also tried to update the `new.test.js` to reflect some big changes that have happened in the project so I could get all the tests passing before opening this PR.

Since `node_modules` gets copied into the project now the `checkGeneratedFiles` function was failing and it made comparing the directory structures slow and essentially impossible. So I changed it to check the expected files one by one and if any file isn't there it returns false.

Then I went through and tried to remove pieces that were no longer relevant as `new` didn't seem to generate a number of the expected files anymore, along with removing the tests for handlebars and haml as I gathered they were no longer supported.

Hope this isn't a complete waste and let me know what you think! :D