Open jameslnewell opened 9 years ago
yeah, duo doesn't support component.json's name
property. there's currently no way to build a plugin for this :/
I had a bit of a hack and was able to get it working by overriding and copy/paste/modifying the duo.dependency
method. If it fails to resolve a package name it tries to resolve it again with a prefix. This is obviously a bit slower and will break whenever the method internals are updated in duo.
// `dep` is a remote dependency
var pkg = this.package(dep, file);
if (!pkg) {
dep = 'js-'+dep;
pkg = this.package(dep, file);
if (!pkg) {
debug('1: %s: cannot resolve "%s"', file.id, dep);
return false;
}
}
ty. :disappointed:
yeah, that's a bit of a hack :p
Hi,
I've finally found some time to play with Duo. It looks like there are some neat improvements over Component!
However, I use prefixes in my repo names so at a glance I know what language/environment they're written for. Component coped with the prefixes but Duo looks like it doesn't support them?
e.g.
digitaledgeit/js-control-model-binding
control-model-binding
require('control-model-binding')
the containing component.json:
{ "name": "my-app", "dependencies": { "digitaledgeit/js-control-model-binding" : "1.2.3" } }
Would this be difficult to add via a plugin? What methods in duo.js would I need to look at?
Thanks.