gruntjs / grunt-init

Generate project scaffolding from a template.
http://gruntjs.com/project-scaffolding
MIT License
193 stars 58 forks source link

composer.phar file copy issue #74

Closed tubalmartin closed 10 years ago

tubalmartin commented 10 years ago

Hi,

At our company we are using grunt-init for scaffolding php composer packages. Inside the root folder in our template we have a composer.phar file. When we execute grunt-init everything (files and folders) seems to be copied fine, but when we try to execute php composer.phar install in the command line the phar does not work (throws some errors) so we have to copy it manually to the grunt-generated project to make it work as expected.

It seems grunt is not copying the composer.phar file correctly, any ideas?

Thanks in advance!

tubalmartin commented 10 years ago

Issue solved! It turns out it was the call to init.copyAndProcess() the responsible for the corruption of the composer.phar file. We used init.copy() instead exclusively for the composer.phar file and it gets copied correctly and works as expected.

May grunt-init check whether the file to process is an archive file and if positive discard the processing of its contents?

tubalmartin commented 10 years ago

Wow, it was much easier than init.copy(): simply pass {noProcess: '**/composer.phar'} as the options argument to the init.copyAndProcess() function and that's it, issue solved.