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

goria

v0.0.10

Published

-- This is in early development if you want to test it now be aware that I update fast and there might be bugs. You can also wait for release 1.0.0 -- ## What is Goria ? Goria is a fast and easy to use templating tool based off Mustache, for creating s

Downloads

4

Readme

Goria Mustache Templating

-- This is in early development if you want to test it now be aware that I update fast and there might be bugs. You can also wait for release 1.0.0 --

What is Goria ?

Goria is a fast and easy to use templating tool based off Mustache, for creating static sites faster !

Just to clarify one thing, Goria is not a js framework nor an interactive site compiler like Svelte; It does have a similar syntax to svelte, and it is a "compiler", but the key difference is that Goria renders your template and then saves it to a static html file. It won't make the data / ui update in real time.

But if you want to use it as a templating engine ( the goria express templating engine is coming soon ) like php you can of course use the JS api instead of the CLI

CLI Usage

First run npm i goria -g Then run goria or goria -d <input folder> -o <output folder> Just typing goria will export and render everything in the "public" directory.

Api Usage

If you want to use goria for let's say an express app as a templating engine, use the coding api.

const goria = require("goria")

The only function you need to know in order to use goria as a parge as an api is transformData(mustache_data,variables--optional) The mustache data is the html file's data and the variables ( optional ) is the the variables that you want to be injected.

Syntax

How does it work ?

This is a typical goria template, let's look at a basic index.html:

<ghead>
	<title>{{company_name}}</title>
</ghead>

<script>
company_name: "GitHabit";
greetings: 'Welcome to '  + $company_name;
staff:
[
	"Some Guy",
	"Another Person",
	"I don't know"
];
</script>

<style>
	body{
	    background-color: aliceblue;
    }
</style>

<content>
   <h1>Our staff</h1>
	    {{#staff}}
		    <h3>{{.}}</h3>
	    {{/staff}}
</content>

You might notice some differences from usual js / mustache implementations ( if you don't know what mustache is you can check their website ) .

Data structuring

In goria data is structured in a simple way :

variable_name : value ; <- this is important

Js Expressions

You might ask yourself how to put some more complex expressions,, such as math, strings and vars, here's how to do it

name : "Sawcce";
message : "Hey " + $name;

Goria uses the $ to declare scoped variables, meaning if you say $name it will get the name var in the template and name will get the name var in the index.js