Closed colinwren closed 11 years ago
Hi Colin,
Is the format for the old Bower component.json file the same as the format that Component uses? Could we potentially support both formats in one swoop, or are they different?
They are a little different, being able to support both would depend on what properties Cartero uses. The name
and version
properties are the same but dependencies
is a little different:
To resolve to Component dependencies you would have to replace the /
with a -
to find the correct bundle.
"dependencies": {
"component/tip": "0.2.1",
"component/jquery": "*",
"component/inherit": "0.0.2"
}
└── components
├── component-inherit
├── component-jquery
└── component-tip
"dependencies": {
"jquery": "~1.9.1",
"handlebars": "1.0.0-rc.4"
}
├── bower_components
│ ├── ember
│ ├── handlebars
│ └── jquery
It would be possible to detect wether the component.json
was for Bower or for Component based on some of the properties, for example, compontent.json
files for Component always have a repo
property. Once you knew if the component.json
was for Bower or Component you could resolve dependencies accordingly.
Going to hold off on this until we get some more requests for this functionality.
Right now Cartero only supports the
bower.json
file name for bower bundles.component.json
was depreciated 3 moths ago in favor ofbower.json
but there are many bower packages that still use it and so it would be nice (and probably very easy) to support it.I ran into this while trying to use Underscore.string which still has a
component.json
.