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

meta-engine

v0.0.0

Published

A language agnostic directive system and preprocessor.

Downloads

9

Readme

meta-engine

A language agnostic directive system and preprocessor.

Offers great power and flexibility without much change in your build process. All the processing happen inside your build process. So there is no runtime overhead at all.

Features

  • Language agnostic. Should practically work for all modern languages.
  • Great support for indent/whitespace sensitive languages (i.e. CoffeeScript).
  • Fills in only the blanks. Not trying to reinvent the wheel or replace template engines.
  • Exposes a Programmatic API.
  • Command Line tool comes alongside.
  • Classically written and easily extensible.
  • Very well documented.
  • Not hardcoded to use the fs module. Can be used with absolutely any sort of data source, not just files.

Installation

[sudo] npm install meta-engine

Quick Overview

meta-engine (as of now) has 2 kinds of directives.

  1. @region and @use
  2. @include

@region and @use

@region tags a block of code so that it can be reused somewhere else using @use.

declare a region

@region "a-name"

supported option(s): indented

use a region

@use "a-name"

supported option(s): match-indent, as-is

@include

Include a file. the contents of that file will be inserted where the @include tag is.

including a file using it's relative path

@include "filepath"

supported option(s): isolated

Examples

Plain HTML Project

header.html

@region "common-header" indented
  <div class="header">
    <div class="title">My Webpage</div>
    <div class="slogan">For a better world</div>
  </div>

index.html

@include "./header.html"
<html>
<body>
  @use "common-header"
  <div>
    Welcome to my page
  </div>
</body>
</html>

about.html

@include "./header.html"
<html>
<body>
  @use "common-header"
  <div>
    A place to rant about your great website.
  </div>
</body>
</html>

Full Usage

See Full Usage before you jump in.

Programmatic API

See Programmatic API in order to incorporate it into your custom build process. And if you are using gulp, we got you covered. Scroll below.

Command Line Tool

See metae to learn more about how to access the full potential of the command line tool. It even walks a directory for you.

Gulp

See gulp-meta-engine

Syntax Highlighting

meta-engine has a very small set of instructions. It can be easily added to the definition fo another language. Syntax Highlighting for atom and sublime-text are provided in the following repository.

See meta-engine-syntax-highlighting

Testing

You need mocha

npm test

Contributing

We actively check for issues even for the least used repositories (unless explicitly abandoned). All of our opensource repositories are being used in commercial projects by SoftEvolve, teamO4, BDEMR or BBS Enterprise. So, it is very likely that we will sort out important issues not long after they are posted.

Please create a github issue if you find a bug or have a feature request.

Pull requests are always welcome for any of our public repos.