Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: NPM module #4

Closed
mn4367 opened this issue May 14, 2017 · 16 comments
Closed

Feature request: NPM module #4

mn4367 opened this issue May 14, 2017 · 16 comments

Comments

@mn4367
Copy link

mn4367 commented May 14, 2017

Could you create an NPM module of UPNG.js? Samples on how to use it in a Node.js or browser context would also be very helpful.

@landsman
Copy link

landsman commented May 15, 2017

We was talk about this with author today.
I hope that npm module will be created soon.
It was a shame not to have it.

@photopea
Copy link
Owner

I asked them to make a web interface for making NPM packages: npm/npm#16625

BWT. I think that GitHub should create its own alternative to NPM, since a lot of interesting software is already here and GIT protocol seems to be uncomfortable for that.

@backspaces
Copy link

I'm sympathetic with the npm package request, but honestly, for a project this young, lets:

Npm is attempting to integrate with github and I use it for one of my dependencies. See:
https://docs.npmjs.com/cli/install
.. and search for github.

The code is delightfully clean (too bad pako isn't, alas). My wish is coming in the next issue :)

@awerlang
Copy link

awerlang commented Jul 7, 2017

Also, to be usable in a Node environment, the file needs this change on the top:

import pako from 'pako';
export var UPNG = {};

@landsman
Copy link

Some progress guys? :-)

@mn4367
Copy link
Author

mn4367 commented Jul 20, 2017

I'm already using UPNG.js in a node module style for this module. If @photopea is OK with it, I can try to publish a pure UPNG.js module. But I can't guarantee any time frame although it shouldn't take too long.

@Scimonster
Copy link
Collaborator

@awerlang Actually you shouldn't use ES6 module syntax yet, as it is not supported by NodeJS. Use

var pako = require('pako');
module.exports = {};

@awerlang
Copy link

@Scimonster you're right, I should have mentioned this requires a transpiler

@Scimonster
Copy link
Collaborator

It looks like someone did publish this to NPM. https://www.npmjs.com/package/upng

Unfortunately without attribution to the original author.

@landsman
Copy link

landsman commented Aug 3, 2017

Sad! @photopea !

@mn4367
Copy link
Author

mn4367 commented Aug 3, 2017

Yes, and also without a public repository and a bunch of IntelliJ IDEA config stuff which shouldn't be part of an NPM module.

@photopea
Copy link
Owner

photopea commented Aug 5, 2017

@Scimonster would you please be able to get UPNG.js to npm, too?

@mn4367
Copy link
Author

mn4367 commented Aug 5, 2017

@Scimonster would you please be able to get UPNG.js to npm, too?

Should @Scimonster do it or should I do it.

@Scimonster
Copy link
Collaborator

@photopea Yes, with the same collaborator agreement we had on UTIF.

@photopea
Copy link
Owner

photopea commented Aug 6, 2017

@Scimonster Ok, I made you a collaborator. Please keep UPNG.js usable in a browser as it is. Add a mention about NPM into README.md . Thank yo very much. I really appreciate your help :)

@Scimonster
Copy link
Collaborator

Done. I had to upload as upng-js because as i said above, someone already took upng.

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

No branches or pull requests

6 participants