5 ms·
Show HN: Bepis – Crazy Format for HTML+CSS in JavaScript
- crtlaltdel 7y agothis is pretty neat!
- everdev 7y agoInteresting project, but why are there Pepsi and PlayStation logo images in the Readme?
- stallmanite 7y agoTo my understanding “bepis” is a goofy vaporwave/meme/shitpost-y concept loosely based on Pepsi.
- saagarjha 7y agohttps://knowyourmeme.com/memes/bepis https://knowyourmeme.com/memes/bepis https://www.urbandictionary.com/define.php?term=Bepis https://www.urbandictionary.com/define.php?term=Bepis
- limelights 7y agoCool project! It reminds me of http://haml.info http://haml.info
- sergiotapia 7y agolooks like haml
- z3t4 7y agoUsing document.createElement to create elements and element.appendChild(node) to add them is tedious. But once you have abstractions in place, like var menu = createMenu(), subMenu=createMenu(), menu.add(subMenu) it becomes very powerful and more fun to work with the DOM.
- NohatCoder 7y agoTime to shill my own alternative. https://github.com/NoHatCoder/DOM_Maker https://github.com/NoHatCoder/DOM_Maker No parser, just a bunch of JavaScript functions that nest nicely, to create dense and readable DOM generation code. Might be time for putting a 1.0 sticker on it. As for Bepis, the mechanism by which elements nest seem complicated, as far as I understand it is controlled by sprinkling , and . throughout the string, I don't get why this would be necessary.
- scotty79 7y agoWhy no examples in the readme?
- kinlan 7y agosnap!
- NohatCoder 7y agoI guess I am better at writing libraries than marketing. So that is definitely on the todo list now.
- kinlan 7y agoIt would be great for people just visiting DOM_Maker to be able to quickly see an example in the README file of the syntax etc.
- undecisive 7y agoAs someone else mentioned, everyone should do this. I've got a similar coffeescript one: https://github.com/undecided/tg https://github.com/undecided/tg (totally usable in vanilla JS too)
- Robin_Message 7y agoThe comma and dot seem weird; curly braces would feel more natural to me. In your example, style isn't terminated by a dot, but other one liners are, which I'm assuming is just a typo else I'm really confused. What's the advantage over JSX?
- wwwigham 7y agoI love me a good, simple, jokey template language. Reminds me of the one I made a few years back[1]. Everyone should write a small template language of their own - it's a neat parser-writing exercise, and the rendering implementation can be comparatively trivial (assuming you don't plan to actually use it in a place where rendering perf matters). [1] http://ham.io/not.js/ http://ham.io/not.js/
- gtsteve 7y agoNice, this reminds me of the Jade templating language [0], although after a bit of Googling I see it's now called Pug [1]. [0] http://jade-lang.com/ http://jade-lang.com/ [1] https://github.com/pugjs/pug https://github.com/pugjs/pug
- SzamarCsacsi 7y agoPug is actually awesome. I use it daily with Vue and I just introduced it to a project I was put on recently.
- m0zg 7y agoAny relation to the pronunciation video: https://www.youtube.com/watch?v=Pa1vXovXn-M https://www.youtube.com/watch?v=Pa1vXovXn-M ? :-)
- rhabarba 7y agoParenscript, but worse.
- imvetri 7y agoPepsi? why that company!
- nwsm 7y agoLol I was hoping that's what the name would be referencing.
- zipster90 7y agoRefreshing!
- slightlyCyborg 7y agoThis is awesome. Reminds me of Clojure's https://github.com/weavejester/hiccup https://github.com/weavejester/hiccup which blows every template engine I've ever used out of the water.