Giter Site home page Giter Site logo

npm? about ccapture.js HOT 5 CLOSED

ardcore avatar ardcore commented on August 19, 2024
npm?

from ccapture.js.

Comments (5)

spite avatar spite commented on August 19, 2024 2

Sure, i'll take a look!

from ccapture.js.

thejmazz avatar thejmazz commented on August 19, 2024

+1. I'm starting a little threejs-starter-pack, would be nice to bring in ccapture through npm as opposed to "downloading and saving a js file" :p which works totally fine, but with npm will be easier to stay up to date, is more automated, etc.

from ccapture.js.

spite avatar spite commented on August 19, 2024

Any idea how to do this? I can add CCapture.js to npm, but the dependencies to Whammy.js for WebM encoding, or gif.js for GIF creation, etc I don't really know how to solve. Especially the gif-worker.js part, since that file has to be loaded by the web worker.

from ccapture.js.

thejmazz avatar thejmazz commented on August 19, 2024

Some of those are already on npm:

If you refactor to get those dependencies from npm install x and then var x = require('x'), and you will then need some sort of bundler, and the dist you produce works, then I think that is enough for it to work.

I'm not sure how to work with web workers from npm packages, but I think for now, it's OK to assume those people pulling in ccapture through will be using a build manager, probably webpack or browserify+gulp. Personally, I'd probably use the webpack-copy-plugin and just copy anything required from node_modules/gif.js/dist/gif.worker.js to /dist/js for example.

Why don't you publish just CCapture.js for now? You can also push more micro updates, and it can be tagged as "pre-release" as well. I can try setting it up from my side by bringing in all those other dependencies myself manually through npm. Then we can go from there?

from ccapture.js.

spite avatar spite commented on August 19, 2024

Published the bundled library (except the gif.js worker script) to https://www.npmjs.com/package/ccapture.js - Please let me know if it works as expected or there are any issues.

from ccapture.js.

Related Issues (20)

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.