Turbo87 / leaflet-sidebar

A responsive sidebar for Leaflet maps
http://turbo87.github.io/leaflet-sidebar/examples/
MIT License
489 stars 158 forks source link

Npm installs a different version #48

Closed CGastrell closed 7 years ago

CGastrell commented 7 years ago

Hi, I love this control, nice and simple.

I have this issue though, when I check the code on the repo there is this method:

setContent: function (content) {
    setContent: function (content) {
        var container = this.getContainer();

        if (typeof content === 'string') {
            container.innerHTML = content;
        } else {
            // clean current content
            while (container.firstChild) {
                container.removeChild(container.firstChild);
            }

            container.appendChild(content);
        }

        return this;
    },

which does exactly what I need. But after installing via npm install leaflet-sidebar the mentioned method looks like this:

    setContent: function (content) {
        this.getContainer().innerHTML = content;
        return this;
    },

Is there a way you can sync npm version to this one? Or shall I go for the install from repo option?

zedd45 commented 7 years ago

Could you post the version you have in your package.json, as well as the output of npm i --verbose leaflet-sidebar?

It looks like the last publish was about a year ago.

When I run the aforementioned command, I get v0.1.9:

npm info lifecycle leaflet-sidebar@0.1.9~install: leaflet-sidebar@0.1.9
npm info lifecycle leaflet-sidebar@0.1.9~postinstall: leaflet-sidebar@0.1.9
zedd45 commented 7 years ago

Actually, it looks like we've had about 6 commits to master since the v0.1.9 release.

@Turbo87 any objections to me bumping packge.json a minor release, and npm puslishing this?

Turbo87 commented 7 years ago

any objections to me bumping packge.json a minor release, and npm puslishing this?

not at all. that would be great, thanks!

could you add me as an owner to the npm package? then I could setup auto publish via TravisCI too.

zedd45 commented 7 years ago

Absolutely! Thanks, @Turbo87

zedd45 commented 7 years ago

@Turbo87 I've attempted to add you via the cli for npm, as well as the web interface. npmjs.com didn't act like it found a user with your email, nor your github handle, but the cli seemed OK to add you with turbo87. Would you check if that's working, and if not, we can handle that outside of this issue?

I've also submitted a PR for a version bump you'll need to accept, and I'll publish the latest version.

CGastrell commented 7 years ago

Thank you guys for your time and effort :)

zedd45 commented 7 years ago

Thank you for identifying the issue.

Turbo87 commented 7 years ago

Would you check if that's working

seems to work great, thanks! :)

zedd45 commented 7 years ago

Published!