ssbc / ssb-keys

keyfile operations for ssb
36 stars 26 forks source link

browserify transforms +++ #41

Closed dangerousbeans closed 5 years ago

dominictarr commented 6 years ago

can you link me to a script to reproduce this problem? because I am able to browserify this as it is... seems like there might be another problem?

dangerousbeans commented 6 years ago

I was seeing it when browserifying from patchcore, cuz I think by default browserify doesn't swap modules inside node_modules unless you hit it with the -g flag for a transform instead of the -t

Here's the fork of patchcore: https://github.com/dangerousbeans/patchcore/tree/browserify

Run

browserify -g [ browserify-replace --replace '{ "from": "^(#.+)", "to": "" }' ] -g aliasify example/index.js | indexhtmlify > index.html

Right now it actually seems to pack! But I'm trying to piece it together so the different way of injecting the keys still lets patchcore have...entry or whatever

dangerousbeans commented 6 years ago

:no_idea_what_im_doing_dog:

dominictarr commented 6 years ago

why do you need all that weird stuff in browserify, in particular what does: browserify-replace --replace '{ "from": "^(#.+)", "to": "" }' do?

dangerousbeans commented 6 years ago

the replace thing strips out the #!/bin/bash lines so that the rest of it doesn't freak out

aliasify is switching net with net-browserify-ws

dominictarr commented 6 years ago

you can just use browserify --unshebang and it ignores #! (once upon a time this was on be default... but whatever)

you also shouldn't need to replace net - if ssb-client is given a ws multiserver address as the remote it will use websockets instead. like this

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.