3 ms·
Do you really save lines of code if you add another dependency? Many lines of code are coming with that...
by brettermeier 5y ago
Do you really save lines of code if you add another dependency? Many lines of code are coming with that...
- dugmartin 5y agoAlways a tradeoff, but the author is already using these dependencies: const parse = require('node-html-parser').parse; const beautify = require('js-beautify').html; const loadYaml = require('js-yaml').load; const showdown = require('showdown');
- malkosta 5y agoThat's possible, not sure if I want. I would have to: 1. drop markdown support, and posts in HTML 2. find a way to parse HTML via regex, which is doable if I use a different notation than a tag for `<partial src=...` 3. use a language that has filesystem support natively, to read files without a dependency I'm working on 2 and 3. But I don't want to drop markdown support on the blog posts...so I guess I will live with this :)
- malkosta 5y agoYes I wanna get rid of all dependencies...just finding my way through it.