brianchirls / Seriously.js

A real-time, node-based video effects compositor for the web built with HTML5, Javascript and WebGL
MIT License
3.87k stars 354 forks source link

npm it #140

Open forresto opened 7 years ago

forresto commented 7 years ago

Hey @brianchirls it has been a while! Could we get this library on npm?

brianchirls commented 7 years ago

Sure. I need to figure out the best way to handle plugins though. Right now, everything uses UMD and depends on either a globally declared Seriously object or requirejs, which I think is not the best way.

Do you have any suggestions on what would work for your use case?

forresto commented 7 years ago

Hmm...

const Seriously = require('seriously') // or import
const accumulator = require('seriously/effects/seriously.accumulator')
const ascii = require('seriously/effects/seriously.ascii')

const mySeriously = new Seriously({plugins: [accumulator, ascii]})

?

positlabs commented 7 years ago

I like that approach. The plugins shouldn't need a reference to the main lib

brianchirls commented 7 years ago

I was thinking something like that as well. It'd be a breaking change, but I could have it still register the plugin globally if the window.Seriously object is there.

oleksandr-shvets commented 7 years ago

@brianchirls you can check out the Lebab project, to convert requirejs AMD to the ES6 "imports". https://lebab.io/

positlabs commented 7 years ago

UMD has some handy module wrappers. https://github.com/umdjs/umd

samthomson commented 5 years ago

any progress on this?

ColorBuffer commented 4 years ago

ugliest javsascript repository i have seen ever

forresto commented 4 years ago

😂😂😂

offworldcoder commented 3 years ago

Hi, It's been a while and I haven't seen an npm/yarn installation. I found a solution to the problem on stackoverflow. It originally discusses meteor but the solution also applies to npm/yarn https://stackoverflow.com/questions/37739097/am-trying-to-import-seriously-js-into-a-meteor-application-am-receiving-an-obje/64550800#64550800