signale icon indicating copy to clipboard operation
signale copied to clipboard

Browser compatibility

Open nielsbril opened this issue 6 years ago • 5 comments

Is your feature request related to a problem? Please describe. We would like to use your package as an abstraction for console.log in both frontend (aka the browser) and backend (Node.js).

Describe the solution you'd like Are you planning on making the package work in the browser console aswell? Or how would you achieve it?

Thanks in advance!

nielsbril avatar May 22 '18 20:05 nielsbril

@nielsbril Signale is built on Chalk and chalk doesn't support that. Here is the comment of @sindresorhus said on the browser compatibility. comment 1 and comment 2

rjoydip-zz avatar May 27 '18 17:05 rjoydip-zz

I noticed. Also the usage of process.stdout would not work in browser. But maybe @klauscfhq has plans on how to make the module compatible with browser console 🙏

nielsbril avatar May 28 '18 20:05 nielsbril

This is a similar package for both Browser and Node.

jim1795 avatar Jun 09 '18 08:06 jim1795

hey everyone here, please subscribe and view #47

screen shot 2018-06-21 at 12 18 44 am

😄

niftylettuce avatar Jun 21 '18 05:06 niftylettuce

@nielsbril This is my ugly solution:

https://codesandbox.io/s/signale-browser-consolelog-adapter-tk9v0

need aliases in webpack resolve (or other build tool) for:

'path': path.resolve(__dirname, "../node_modules/path-browserify"),
'readline': path.resolve(__dirname, "../node_modules/readline-browserify"),
'fs': path.resolve(__dirname, "../node_modules/browserify-fs"),

May be i will make this ability like an option for Signale origin package

astr0junk avatar Dec 19 '19 10:12 astr0junk