johnpapa / gulp-patterns

Playground for Gulp Recipes
501 stars 146 forks source link

Circular dependency with bower #90

Closed igorlino closed 8 years ago

igorlino commented 9 years ago

Ok, after playing around with some systems and some people, a problem was highlighted. 0) "npm install gulp bower -g" 1) "bower install" calls "gulp wiredep" 2) "npm install" will call "bower install". 3) "gulp " requires step 2.

.bowerrc { "directory": "bower_components", "scripts": { "postinstall": "gulp wiredep" } }

npm package.json "scripts": { "init": "npm install", "install": "bower install", "start": "node src/server/app.js", "test": "gulp test" },

So, i think for projects that have existent node_modules and bower_components, the problem is not really visible.

For a fresh project checkout, the circular dependency will show up. "gulp wiredep" although convinient, seem to me a bit harmful.

That target anyways is called for "gulp build" or any variation of "gulp serve-". So it won't have side-effects to remove "gulp wiredep" from the bower .bowerrc file.