Swiip / generator-gulp-angular

Yeoman generator for AngularJS with GulpJS [UNMAINTAINED next iteration is FountainJS]
http://fountainjs.io
3.72k stars 664 forks source link

jquery not injected into html #986

Open jmls opened 8 years ago

jmls commented 8 years ago

no matter how hard I try, I cannot seem to get jquery injected into my html

All the other libs (like jointjs) are injected ok.

it's defined in the bower.json file, it exists in bower_components, there is a bower.json file in the jquery directory with a main pointing to jquery.js.

What am I missing ?

labrute commented 8 years ago

Find some exclude file in gulp tasks. It could happen if you have not selected this option during the generation process.

ghost commented 8 years ago

For me, the problem was in gulp/conf.js:

// something something something
exports.wiredep = {
  exclude: [/jquery/],
  directory: 'bower_components'
};
// blah blah blah

Remove /jquery/ from there and you'll (hopefully) be golden.

c-johnson commented 8 years ago

Is there a stated reason why /jquery/ is explicitly excluded in the gulp conf? Even if we select that we don't want jQuery in the initial setup phase, I don't know why it wouldn't just not install it, rather than creating a permanent exclusion hidden in some conf file. If you want to add jQuery later (as in our case) this is a very silly bug to try and track down.

Swiip commented 8 years ago

It's in bower dependency of Angular. That's why we have it and exclude it. The other solution would be to abuse of the bower override configuration but I didn't feel this as the right solution.

VishneviyMazhor commented 8 years ago

Sorry for my EN. Guys it's not a deal to fix that way. I can't understand how is it possible jquery to be included when it is not available (not installed) in bower deps? I've tried it and noticed that there is no reason to exclude it in conf.js. Am i wrong?