Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[CRITICAL REQUEST] Please make npm library!

See original GitHub issue

Hi, thank you for creating such a cool tool like Flare!

However, I found the way of using it, at least currently, with javascript is very far from the standard.

In my opinion, being able to install Flare as npm dependency(like the below) is neccessary.

npm install flare

Then developers could use it with well defined, clean API like this.

  import Flare from 'flare'

  const flareObject = new Flare({
    target: "#canvas-id",
    file: "example.flr",
    width: 128, // default to full parent width if unspecified
    height: 128, // default to full parent height if unspecified
    onSomeEvent: () => { ... },
    onAnotherEvent: () => { ... }
  <canvas id="canvas-id"></canvas>

If Flare provides clean vanilla js API, then community would possibly create ecosystem, like vue or angular component by themselves.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

luigi-rossocommented, Aug 9, 2019

This is a good idea. We have a flare-react one, we should do this for flare-js too! Thanks!

luigi-rossocommented, Oct 21, 2019

Give this a try! npm install @2dimensions/flare-js

We’re also looking into externalizing our slimmed down CanvasKit so you can link it externally. Currently it’s bundled with the JS. We could trim almost 2MB by doing this, but it would require a slightly more tedious setup for end users.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. This can be caused by...
Read more >
Webpack - Critical dependency: the request of a dependency ...
Solved with npm install request@2.79.0 --save. According to the authors of ajv , the issue will likely be resolved in the latest version...
Read more >
How To Use Node.js Modules with npm and package.json
Let's run through this example. In your locator application, you will use the axios library, which will help you make HTTP requests. Install...
Read more >
[BUG] npm update not updating package.json #708 - GitHub
The packages listed in the package.json which are meant to be updated according to their semantic version (^) are completely ignored when ...
Read more >
Fixing security vulnerabilities in npm dependencies in less ...
This is the first thing you should do and it's the simplest one too. Run npm update —; Delete your package-lock.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found