3 ms·
Question: if it's written in C, why does it require Chalk, a JS lib?
by ezekg 10y ago
Question: if it's written in C, why does it require Chalk, a JS lib?
- diegomacario 10y agoIt is actually written in C++. Github says C because the SQLite files are a lot bigger than the ones I wrote. And Chalk is used because in the following way: - The application creates a file called pfox_console_printout.js, which is hidden in your home directory. - It writes the tables/graph line by line into that file. Each line starts with 'console.log(' or 'process.stdout.write(' and ends appropriately. - When it is done writing it executes 'node pfox_console_printout.js' and all the data is displayed. The reason I went through the trouble of doing all that is to have Windows support. I had a lot of issues with Unicode characters and with changing the colors of text in a way that worked in Unix and Windows. I also think that using Chalk simplifies the process of changing the colors, which will prove useful when I start supporting new color schemes!