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

hashspace-prototype

v0.0.1-SNAPSHOT

Published

hashspace runtime prototype

Downloads

4

Readme

Build Status

hashspace

Hashspace is a client-side HTML template engine - currently under construction. Its purpose is to provide a powerful and light-weight way to create adanced web-pages containing application logic.

The key targetted features are:

  • a simple an natural template syntax thanks to an offline compiler
  • bi-directional data-binding on any HTML element property (attributes and content)
  • light-weight (target: <20kb minified compressed for the runtime library)
  • support of sub-templates and widget libraries
  • support of advanced expressions

Hashspace is composed of 2 main parts:

  • a file pre-processor that translates the HTML templates into JavaScript functions (cf. compiler test files for the syntax)
  • a runtime library that interprets the compiled templates dynamically

Please refer to the samples in the unit-tests suites in the 'test/compiler or 'test/rt' folders for more details. The public/samples folder also contains a pseudo-code implementation of what should be the todomvc implementation once the minimum set of features are implemented.

Currently only some parts of the runtime are developed:

  • json wrapper to set properties in a data object and automatically trigger notifications to observer objects
  • text nodes
  • data binding on properties
  • element nodes (e.g. div, span, section, h1...)
  • {if} statements
  • {insert} statements
  • {foreach} statements
  • array data-bindings (i.e. automatic refresh of foreach nodes when the foreach array is changed)

To run and update the samples in a live environment, first run npm install and then:

  • run grunt to launch a local web-server that can compile templates on the fly (cf. hsp/grunt folder)
  • open http://localhost:8000 in your favorite browser and choose an example from the sample list
  • or open http://localhost:8000/todomvc to play with the todomvc sample..

Development

Preparing your environment

  • install Grunt cli globally: npm install -g grunt-cli
  • install local npm modules: npm install

Running Tests

For jshint validation:

  • run grunt checkStyle

For the compiler test:

  • run grunt mochaTest

For the browser runtime tests:

  • run grunt - this will launch a local webserver and a watch task on your files
  • and access http://localhost:8000/test/rt to run the tests in your favorite browsers