cgross / generator-cg-angular

Yeoman generator for Enterprise Angular projects.
MIT License
592 stars 198 forks source link

Make grunt-contrib-imagemin optional #46

Closed bolora closed 10 years ago

bolora commented 10 years ago

grunt-contrib-imagemin is a complete wreck in a windows environment. To get cg-angular to work in windows (unless there is some other way I don't know) I have to remove grunt-contrib-imagemin from the app. Otherwise something as trivial as git branch new_branch / git checkout new_branch utterly fails because of the 260 character limit in windows paths.

grunt-karma is equally challenging but many times it can be overcome with a very shore path name to your project like c:\myProj\

removing grunt-contrib-imagemin in windows requires manual removal of heavily nested node modules, then altering Gruntfile.js to remove imagemin tasks.

So I suggest adding this to a prompt like angular ui router and placing a note (not recommended for windows)

I know, this is lame... but it is VERY painful in windows/git

cgross commented 10 years ago

Yes I've hit this before as well. I think there was a new release of the imagemin module specifically to prevent some of these issues on Windows.

Can you try updating to the latest grunt-contrib-imagemin and see if you still hit the issue?

bolora commented 10 years ago

Testing changing package.json reference to "grunt-contrib-imagemin": "~0.7.0" I'll let you know if it works... right now just getting rid of the old files is quite the challenge!

bolora commented 10 years ago

That did not fix the issue. Looking into other possible fixes like including dependent libraries before grunt-contrib-imagemin so they don't get nested to infinity

bolora commented 10 years ago

i managed to minimize problems with this package.json to flatten the structure some but its not all completely vetted

{ "name": "<%= _.slugify(appname) %>", "version": "0.0.0", "devDependencies": { "underscore": "~1.4.3", "underscore.string": "~2.3.1", "image-type": "^0.1.1", "readable-stream": "^1.0.27", "rimraf": "^2.2.6", "tempfile": "^0.1.3", "bin-build": "^0.1.0", "bin-wrapper": "^0.3.0", "log-symbols": "^1.0.0", "exec-buffer": "^0.1.0", "grunt": "~0.4", "grunt-dom-munger": "~3.4", "grunt-angular-templates": "~0.5", "grunt-ngmin": "0.0.3", "grunt-contrib-connect": "~0.6", "grunt-contrib-copy": "~0.5", "grunt-contrib-clean": "~0.5", "grunt-contrib-concat": "~0.3", "grunt-contrib-cssmin": "~0.7", "grunt-contrib-uglify": "~0.2", "grunt-contrib-jshint": "~0.9", "grunt-contrib-htmlmin": "~0.1", "grunt-contrib-imagemin": "~0.7.0", "grunt-contrib-less": "~0.8", "grunt-contrib-watch": "~0.6", "grunt-browser-output": "0.1.0", "load-grunt-tasks": "~0.2", "karma": "~0.12.6", "grunt-karma": "~0.8.3", "karma-jasmine": "~0.1.5", "karma-phantomjs-launcher": "~0.1.4", "karma-chrome-launcher": "~0.1.3", "karma-mocha-reporter": "~0.2.5", "karma-firefox-launcher": "~0.1.3" } }

bwinchester commented 10 years ago

Yeah, I mainly develop on Mac, but had to do a few apps on a Windows box. The 260 char limit is horrible when trying to get .NET shops to try node development with node dependencies. I ended up setting the project as close to the root of the drive as possible (as you pointed out) and ng-min has horrific issues on Windows. I just delete ng-min from the grunt file and commit the change to the repo when I have to work in a Windows environment. Sad thing is, Microsoft has been asked by the developer community to fix the 260 char limit on $path and they have rejected it and prevented people from actually commenting any further on the forum.

bolora commented 10 years ago

ngmin is not a problem as far as I can tell. grunt-contrib-imagemin is the biggest source of problems