Closed adorsk closed 10 years ago
I think this looks good. Can you fix up the conflicts? I'm inclined to say we check it in and see how people like it. I think using the canonicalDir
unless a location is specified is the way to go. We can always evolve it if people need more flexibility. Good stuff!
Cool, sounds good to me! I merged in the latest upstream changes just now, ready for review.
I think moduleType is also going to come in as an array. This is what bower init
generates.
{
"name": "foo",
"version": "0.0.0",
"authors": [
"Rob Dodson <robdodson@google.com>"
],
"moduleType": [
"node"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"polymer": "~0.2.0"
}
}
@sindresorhus @wibblymat are there any packages registered that have a moduleType
set to node
? I'd like to build acceptance tests for this feature if you guys think it's ok to move ahead.
@robdodson i doubt it. it isn't even in the spec. but you could just create one for testing.
Just added handling for moduleType as array
@adorsk do you want to put together an acceptance test based on @sindresorhus 's suggestion? If we can get tests in then I'd be happy to land this when bower ships the next version that contains moduleType.
Hi @robdodson, sure thing, I'll put together an acceptance test per @sindresorhus 's suggestion. And I'll see if I can pull out the 'return config as object' feature into a separate PR.
@robdodson acceptance test added, ready for review
@robdodson
I checked this before bower shipped moduleType
but it looked ok to me then. I'm traveling this week but can look at merging this in maybe Friday if I can find some down time.
@adorsk also need to fix the merge conflict ;)
@sindresorhus Try this commit.
There was a fair amount of stuff to merge in, but it should be all there now.
Thanks @adorsk! I've updated the grunt task, updated readmes, and published everything to npm.
Nice! And thank you @robdodson, pleasure to contribute to this project. I like your work.
Here's a naive implementation for adding as package based on moduleType, per issue #1.
There a few unit tests added, but no acceptance tests. Variable/string names will probably change based on final version of moduleType in bower.json spec.
I'm also not sure yet how yall want to handle location/main, looks like there was some considerable discussion on this.
But perhaps this is can be an initial strawman. (it's actually something I need for my current projects anyway).