You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pretty new to grunt...so this might be easy, but I'll show you what I'm doing and maybe you can help.
Whenever I add a library via bower that has a period in the directory name, slick.js, lunr.js, animate.css, etc. I get a build error as the various build steps are attempting to operate on the directory instead of the file. So, I have gone into the gruntfile and added exclusions for these directories:
This works, but I need to do it for every project and make it very specific to the project I'm including as you can see. Maybe I'm misunderstanding the globbing rules as I thought I could do it more generically but I have tried several things and none of them works...is there a way for me to make this more generic?
Also, at the same time I discovered this issue, I discovered that certain of these libraries, even after grunt will build them, fail to work after minified and concatenated. Select2, for instance, even once it was added to the exclusion list just as above does not work. Slick is another one. I just get an error about slick not being an object or the like. Is this related to what I'm talking about here or is it a problem with their libraries? If so, they provide a minified version - how do I use the minified version - the injector keeps overwriting my changes in the index.html file and I can't seem to get it to "stick."
I don't think this is a bug in your code but I've looked around and don't see any content on this subject so I think others must not be using libraries with periods in the name or I'm doing something really wrong.
thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I'm pretty new to grunt...so this might be easy, but I'll show you what I'm doing and maybe you can help.
Whenever I add a library via bower that has a period in the directory name, slick.js, lunr.js, animate.css, etc. I get a build error as the various build steps are attempting to operate on the directory instead of the file. So, I have gone into the gruntfile and added exclusions for these directories:
rev: {
dist: {
files: {
src: [
'<%= yeoman.dist %>/public/{,}/.js',
'<%= yeoman.dist %>/public/{,}/lunr.js/.js',
'!<%= yeoman.dist %>/public/bower_components/lunr.js',
'<%= yeoman.dist %>/public/{,}/slick.js/.js',
'<%= yeoman.dist %>/public/{,}/slick.js/__/.js',
'!<%= yeoman.dist %>/public/bower_components/slick.js',
'<%= yeoman.dist %>/public/{,/}.css',
'<%= yeoman.dist %>/public/assets/images/{,/}.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/public/assets/fonts/*'
]
}
}
},
and,
This works, but I need to do it for every project and make it very specific to the project I'm including as you can see. Maybe I'm misunderstanding the globbing rules as I thought I could do it more generically but I have tried several things and none of them works...is there a way for me to make this more generic?
Also, at the same time I discovered this issue, I discovered that certain of these libraries, even after grunt will build them, fail to work after minified and concatenated. Select2, for instance, even once it was added to the exclusion list just as above does not work. Slick is another one. I just get an error about slick not being an object or the like. Is this related to what I'm talking about here or is it a problem with their libraries? If so, they provide a minified version - how do I use the minified version - the injector keeps overwriting my changes in the index.html file and I can't seem to get it to "stick."
I don't think this is a bug in your code but I've looked around and don't see any content on this subject so I think others must not be using libraries with periods in the name or I'm doing something really wrong.
thanks.
The text was updated successfully, but these errors were encountered: