jspm / registry

The jspm registry and package.json override service
https://jspm.io
229 stars 255 forks source link

Getting LESS on client and server #221

Open guybedford opened 9 years ago

guybedford commented 9 years ago

The npm version is currently giving:

Error evaluating file:..../jspm_packages/npm/image-size@0.
3.5/lib/index.js
Module ../lib/detector not declared as a dependency.]

This may need some override work.

//cc @whitecolor

guybedford commented 9 years ago

It could be possible to define these dependencies through custom config -

System.config({
  meta: {
    'npm:image-size@x.y.z/lib/index': {
      deps: ['./lib/detector']
    }
  }
});

But that won't work for an override. I'd suggest rather forking the repo to ensure static requires.

wclr commented 9 years ago

Right this works with config. So there is no way handle such by System.js? Isn't it possible to decare the deps inside th package but not in the code?

guybedford commented 9 years ago

No not currently - that's why I'd suggest forking the repo and adding the meta custom -

  "deps ./lib/detector";
  // ... source
wclr commented 9 years ago

but is it possilbe in future, how?

guybedford commented 9 years ago

By extending deps shims to formats other than globals.