Coder Social home page Coder Social logo

Add library to NPM about keyshapejs HOT 10 CLOSED

homerjam avatar homerjam commented on August 30, 2024
Add library to NPM

from keyshapejs.

Comments (10)

Pixofield avatar Pixofield commented on August 30, 2024 1

I can consider adding KeyshapeJS to NPM when the next version is released.

from keyshapejs.

Pixofield avatar Pixofield commented on August 30, 2024 1

KeyshapeJS has been published on NPM: https://www.npmjs.com/package/keyshapejs

It can be imported and used like this:

import * as KeyshapeJS from 'keyshapejs';

var timeline = KeyshapeJS.animate(...);

It works with SVG inlined in HTML, but the library can't be used with SVG files loaded with <object>. It means that the library can't really be used to animate files exported from the Keyshape app without manually modifying the SVG so that it can be inlined in HTML.

from keyshapejs.

Pixofield avatar Pixofield commented on August 30, 2024

KeyshapeJS isn't intended to be a generic JavaScript animation library, so adding it to NPM may not be a good idea.

from keyshapejs.

wwwonka avatar wwwonka commented on August 30, 2024

~Fair point.
Although, considering the importance keyshape.js has as a dependency in some projects , it feels rather inglorious to treat it as an old-school script and be brought back to check for updates manually instead.

Would you consider instead making the repo installable as a package with npm i Pixofield/keyshapejs#master? This would make things a lot more convenient and proper for setting up projects while still not publishing it on npm.

Just a suggestion.

from keyshapejs.

wwwonka avatar wwwonka commented on August 30, 2024

Any taughts on this suggestion?

from keyshapejs.

wwwonka avatar wwwonka commented on August 30, 2024

Hi! Congratulations on the new release and features! The icon looks way better in my opinion as well..!

So...
With this new release, can we hope for a cherry on top, AKA a KeyshapeJS npm package !?

from keyshapejs.

Pixofield avatar Pixofield commented on August 30, 2024

I can try to publish KeyshapeJS to NPM, but I'm not sure how you want to use it.

Should the package have the same files as the repository has? How do you plan to use them?

from keyshapejs.

wwwonka avatar wwwonka commented on August 30, 2024

It is just way more convenient to have a library as a npm dependency.

It allows to keep a better eye on how much each external dependencies weights.
It also allows to keep the code up to date automatically.
It allows to defer loading with better control.
~ etc.

I don't think the current structure of the lib would allow tree-shaking but that could be a way of improving things in the future.

Why exactly do you have a reluctance to publish keyshapejs on npm, if you don't mind me asking?

from keyshapejs.

Pixofield avatar Pixofield commented on August 30, 2024

I can publish it on NPM. I'm trying to understand how the library will be used so that I can test it.

Do you plan to use it in a React app? Do you plan to import it into JavaScript?

from keyshapejs.

wwwonka avatar wwwonka commented on August 30, 2024

On my side I plan to use it as animport statement, yes.

from keyshapejs.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.