packery
packery copied to clipboard
Build process with gulp and and main-bower-files
Hi metafizzy,
It's maybe worth mentioning in the docs that if you are using the main-bower-files
gulp plugin to add this to your bower.json
:
"overrides": {
"packery": {
"main": "dist/packery.pkgd.js",
"dependencies": {}
}
}
Took me quite a while to figure that out.
Thanks for reporting this issue.
On the Bower side, main
should not be used for compiled files or distribution files. We're looking to resolve adding a field for files to include with files. See bower/bower.json-spec#47.
Huh, didn't realise that.
So I guess that means the main-bower-files
plugin is has the wrong idea about bower too.
I've been using it for ages and rarely come across issues.. most major plugins (jQuery, Lo-dash, etc.) seem to use main
for their un-minified distribution file(s), so it does seem like a convention of sorts.
I believe a better solution is to point to the 4 .js
files
"overrides": {
"packery": {
"main": [
"js/rect.js",
"js/packer.js",
"js/item.js",
"js/packery.js"
]
}
}
This way you can have individual files all up the dependency tree, and concat them if necessary.
One downside to this, is if you decide to change your structure then the override will need to be changed too. I'll use this though, thanks for your help :+1: