Closed mdartic closed 7 years ago
Hi @mdartic, we should make a PR at iso8601-js-period, or ask @phammer if he can add a package.json in their repository, no?
Here, I assume we should change: "iso8601-js-period": "*", by: "iso8601-js-period": "nezasa/iso8601-js-period",
And its ok for me to publish the plugin in npm!
I'll do that, but I checked the repo and I didn't see any activity since the last commit in 2013.
So, I prefer to add the repo first in your package.json and after see if there is any chance to transform iso8601 in a npm package.
So, in fact I've created the npm package of iso8601-js-period
.
I didn't remember npm install
need a repo with a package.json
.
Thanks for reviewing the PR.
thanks @mdartic! merged! :)
Great, thank you, could you publish it to npm ?
done. Can you test it?
Well, the package is well published,
But I encounter an error with the initialisation of the plugin.
I use webpack, and I import leaflet-timedimension
.
When I execute the code, I get the error in the browser
leaflet.timedimension.min.js:18Uncaught ReferenceError: jQuery is not defined
And if I import jQuery
before leaflet-timedimension
in my code, same result.
If you have an idea, I'll take it !
Else, maybe I'm gonna make a PR for #86 :-)
By the way, thanks for publishing it !
To make it work for the moment, we have to include a script tag and load jQuery basically before the bundle of webpack, or the plugin itself.
Just like if we were writing vanilla JS.
But it's ok, and I close the issue. I'm gonna work on #86 to make the integration better.
I managed to make it work with webpack (v1) with these instructions:
require('iso8601-js-period');
window.jQuery = require('jquery');
require('leaflet');
require('leaflet-timedimension');
I think this is related to #12
Thank you ! Works perfectly.
Hello again,
I'm using npm to instantiate my projects, and not bower.
There isn't any npm package published yet, I think it could be nice.
But, with npm, we can install a package directly from his github URL, for example
I encounter some errors :
This is due to the iso8601-js-period that is not declared into npmjs registry.
Several questions :