Closed guybedford closed 9 years ago
How can you plan to do that? Maybe I could help but I need some guidance.
Thanks, it's mostly just the same pattern as the others https://github.com/jspm/npm/blob/master/npm.js#L28.
It isn't much more than a wrapper though, so I will aim to get to it soon.
I can't create the repo. :cry:
Ok, I've added this above.
How can I test this? When I try to reinstall npm:ractive-load
nodelibs-module
is not being intalled together.
You need to update the jspm-npm dependency of jspm to this master version, then use install -f
I did that. Doesn't work.
Ahh, this is because ractive
contains this code:
Module = (require.nodeRequire || require)('module');
The above isn't a require that can be picked up by static analysis.
Instead I would suggest loading ractive-load
as a global or AMD library using an override, something like:
jspm install npm:ractive-load@0.4.0 -o "{ format: 'global' }"
See https://github.com/jspm/registry/wiki/Configuring-Packages-for-jspm#package-module-format for more info.
Created an issue to track this above, will help as soon as I can, overrides are a pain to test out as there are quite a few factors, but perseverance pays off!
Thanks for the support!
I installed ractive-load
as a global. Now when jspm bundle-sfx
runs I get this:
My ract plugin:
require('ractive');
require('ractive-load');
exports.translate = function(load) {
load.source = 'module.exports = ' + JSON.stringify(load.source);
return Ractive.load(load.address).then(function(c) {
Ractive.components['ract-test'] = c;
});
}
Only in Node.