DEV Community

Cover image for ascii-themes - Node.js CLI Interface to Generate VSCode Themed ASCII Art

ascii-themes - Node.js CLI Interface to Generate VSCode Themed ASCII Art

Alex Lakatos 🥑 on September 29, 2019

I've built a Node.js CLI interface this weekend to generate themed ASCII art. It supports 287 fonts from Figlet and 18 themes from VS Code. This...
Collapse
 
ibrahimcesar profile image
Ibrahim Cesar • Edited

I tried your example and I get this error:

Invalid regular expression flags
Collapse
 
lakatos88 profile image
Alex Lakatos 🥑

What command did you run?

Collapse
 
ibrahimcesar profile image
Ibrahim Cesar
npx ascii-themes generate dev.to
Thread Thread
 
lakatos88 profile image
Alex Lakatos 🥑

what's your OS and terminal app? you might have to escape that string.

npx ascii-themes generate 'dev.to'

Thread Thread
 
ibrahimcesar profile image
Ibrahim Cesar

I'm a Mac OS with Oh My Zsh in the iTerm2:

 ibrahim.souza@Pudim  ~  npx ascii-themes generate 'dev.to'
npx: instalou 46 em 4.971s
Invalid regular expression flags
 ✘ ibrahim.souza@Pudim  ~  npx ascii-themes generate "dev.to"
npx: instalou 46 em 2.524s
Invalid regular expression flags
Thread Thread
 
lakatos88 profile image
Alex Lakatos 🥑 • Edited

That is totally weird, the CLI doesn't throw that message, it's from somewhere deeper in the dependencies. I can't reproduce it, can you help me debug it please? Maybe even throw in a PR at github.com/AlexLakatos/ascii-themes

I'm guessing it tries to interpret the . in dev.to as regex. What happens if you try some text without the dot, like npx ascii-themes generate "devto"

Collapse
 
vladimirlojanica profile image
Vladimir Lojanica

Works great.
You've ruined my life!

Collapse
 
lakatos88 profile image
Alex Lakatos 🥑

Oh, I've got an update planned for this weekend, stay tuned :D