npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

beardless

v0.0.2

Published

DSL-less html templating. No logic guaranteed!

Downloads

15

Readme

Beardless - DSL-less html templating engine for node.js

Build Status

Why?

Ok, there's mustache, there's ejs, jade and some others I haven't looked at in detail. There are quite good templating engines out there allready, so why do I have to reinvent the wheel?
Now, let me get this straight from the start: I didn't reinvent the wheel.

The majority of the existing templating engines implement some form of DSL. Mustache, for example, with it's nice {{mustache}} syntax, brags about being logic-less. But, by forcing you to use variables (and more importantly partial includes!), that you have to explicitly put somewhere in your template, you do end up squashing logic into your templates that you would want to have in your controller. This is critical, if you want to implement some plugin system, where plugins should be able to extend the user interface, because your templates limit the ability of plugins to extend the UI. You don't want this! Another problem, is the use of DSLs itself. By implementing their own meta-language that is incompatible to the HTML spec and other templating languages, todays templating engines make a designers life harder, having to learn and understand the different reincarnations of templating languages.

I believe, the very idea of a 'templating language' is wrong.

That's why I created beardless.
Inspired by plates and utilizing jsdom, beardless lets you write your templates in pure, beardless HTML, while still providing all features you'd expect from an advanced templating engine (well, not quite yet, but stay tuned).

Example

Your params:

{ title: "The template engine site"
, post:
  { title: "Next generation templating: Start shaving!"
  , text: "TL;DR You should really check out beardless!"
  , comments:
    [ {text: "Hey cool!", author:"mike"}
    , {text: "Really gotta check that out...", author:"steve"}  ]
  }
}

Your template:

<html>
  <head>
  <title data-template="title"></title>
  </head>
  <body>
    <h1 data-template="post.title"></h1>
    <p data-template="post.text"></p>
    <div>
      <div data-template="post.comments" class="comment">
        <p data-template="post.comments.text"></p>
        <p data-template="post.comments.author"></p>
      </div>
    </div>
  </body>
</html>

Output:

<html>
  <head>
  <title>The template engine site</title>
  </head>
  <body>
    <h1>Next generation templating: Start shaving!</h1>
    <p>TL;DR You should really check out beardless!</p>
    <div>
      <div class="comment">
        <p>Hey cool!</p>
        <p>mike</p>
      </div>
      <div class="comment">
        <p>Really gotta check that out...</p>
        <p>steve</p>
      </div>
    </div>
  </body>
</html>

Installation

Roadmap

  • implement partial include functionality
  • allow people to modify attributes

Legal

MIT LICENSE