Seriously.js icon indicating copy to clipboard operation
Seriously.js copied to clipboard

npm it

Open forresto opened this issue 8 years ago • 10 comments

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

forresto avatar Jan 06 '17 16:01 forresto

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?

brianchirls avatar Jan 10 '17 17:01 brianchirls

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]})

?

forresto avatar Jan 10 '17 18:01 forresto

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

positlabs avatar Jan 10 '17 18:01 positlabs

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.

brianchirls avatar Jan 10 '17 19:01 brianchirls

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

oleksandr-shvets avatar Mar 09 '17 03:03 oleksandr-shvets

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

positlabs avatar Mar 09 '17 22:03 positlabs

any progress on this?

samthomson avatar Aug 09 '19 11:08 samthomson

ugliest javsascript repository i have seen ever

WilledgeR avatar Aug 23 '20 00:08 WilledgeR

😂😂😂

forresto avatar Aug 23 '20 07:08 forresto

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

offworldcoder avatar Oct 27 '20 08:10 offworldcoder