Open nkovacic opened 7 years ago
As include.js does not support node module loading, I don't think it's worth putting it on NPM. But maybe i'm wrong ! Any idea ?
I wanted to you use it for client side external library lazy loading (Youtube api, google maps,...). Because of continous deployment it better if the library can be loaded from package managers (NPM and bower).
You can install non npm package with npm with npm install git@github.com:CapMousse/include.js.git --save
. It will create a "include.js": "git+ssh://git@github.com/CapMousse/include.js.git"
line in your package list :)
Hey. I have a problem... I installed the dep as you offered above. After that I imported in a constructor of class of my React app:
this.include = require('../../node_modules/include.js/include.js');
Then I got my js file from apache and I had 200 OK:
this.include.include(['http://localhost:81/validator/validate.js'], function (d) {
console.log(d);
}
And d receives 1. Do you have a guess what happened? Thank you in advance
I didn't try to use Include with React/NPM. Maybe it doesn't like to be "included". I will check that.
So, i'm working on a "npm friendly" version of Include.js. Some works need to be done to enable loading the module. So : soon™
I could not find this loader on npm? Would be very useful if it was uploaded on it.