msikma / pokesprite

Database project of box and inventory sprites from the Pokémon core series games
https://msikma.github.io/pokesprite/
MIT License
972 stars 167 forks source link

added Yarn compatibility #29

Closed route1rodent closed 7 years ago

route1rodent commented 7 years ago

Added Yarn compatibility. Yarn is becoming a popular replacement of bower and npm, but it requires a package.json file for each project. Without this file it is not possible to install this project as a dependency of other projects via yarn. That's the only requirement and there is no need to publish this package anywhere it would be as simple as yarn add https://github.com/msikma/pokesprite.

msikma commented 7 years ago

Hi there. Thanks for your PR! I will gladly merge this, but I wonder if this is the correct way to go about it. The package is already on NPM. So where's the package.json file? It's actually generated by the build script. This package is minimal, since you normally don't need the generator and the individual image files.

I guess there's also use cases for using the project itself as a dependency, including all the generator code and the individual images. But now I'm thinking maybe it would be much better to distinguish the two, by naming the one that's now up on NPM into something like pokesprite-build. What do you think? For your purposes, do you need everything here or is just that NPM package sufficient?

route1rodent commented 7 years ago

Oh, I didn't know it was in npm, I didn't find the package.json so I didn't take a look.

Anyway, probably it would be easier for you to keep your current build system and add a minimal package.json to the root project folder (maybe adding "name":"pokesprite-src" to not confuse people), what do you think?

For my purposes I would only need the individual images from the latest master commit, so I don't need the sources versioned in npm, but it would be welcome if it's not too much maintenance effort for you :)

msikma commented 7 years ago

You are right. Naming the current one something like pokesprite-src is the best solution. So I'll do that in a bit...

msikma commented 7 years ago

Would this work? https://github.com/msikma/pokesprite/blob/master/package.json

route1rodent commented 7 years ago

That's perfect! thanks a lot @msikma and thanks for this amazing project! I will close then this PR

msikma commented 7 years ago

This made me realize I should probably put the build itself in version control, because as it is now it's a bit confusing. Thanks for raising the issue.