Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

NPM package? #19

Open
nkovacic opened this issue Feb 20, 2017 · 6 comments
Open

NPM package? #19

nkovacic opened this issue Feb 20, 2017 · 6 comments
Labels

Comments

@nkovacic
Copy link

I could not find this loader on npm?
Would be very useful if it was uploaded on it.

@CapMousse
Copy link
Owner

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 ?

@CapMousse CapMousse added the talk label Feb 20, 2017
@nkovacic
Copy link
Author

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).

@CapMousse
Copy link
Owner

You can install non npm package with npm with npm install [email protected]:CapMousse/include.js.git --save. It will create a "include.js": "git+ssh://[email protected]/CapMousse/include.js.git" line in your package list :)

@pitronalldak
Copy link

pitronalldak commented May 8, 2017

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

@CapMousse
Copy link
Owner

I didn't try to use Include with React/NPM. Maybe it doesn't like to be "included".
I will check that.

@CapMousse
Copy link
Owner

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™

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants