[CRITICAL REQUEST] Please make npm library!
See original GitHub issueHi, 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.
<script>
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: () => { ... }
})
</script>
<body>
<canvas id="canvas-id"></canvas>
</body>
If Flare provides clean vanilla js API, then community would possibly create ecosystem, like vue or angular component by themselves.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top 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 — https://docs.npmjs.com/cli-commands/update.html; Delete your package-lock.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a good idea. We have a flare-react one, we should do this for flare-js too! Thanks!
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.