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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gulp-tateru-cli

v0.3.2

Published

Gulp plugin to build templates, using tateru-cli

Readme

gulp-tateru-cli

NPM Version GitHub Release Build Status Codecov Maintainability Codacy Badge

gulp plugin to build templates, using tateru-cli

Issues

Simple gulp plugin for streamlining integration of the tateru-cli into gulp workflow. If you encounter problems related to file generation, please report them in the tateru-cli issues. Only create a new issue if it looks like you're having a problem with the plugin itself.

Requirements

  • Node.js v20 or higher
  • Gulp v4 or higher

Install

npm i -D gulp-tateru-cli

Usage

For further documentation about using tateru-cli, please look for its documentation. For further documentation about using Gulp, please look for its documentation.

Requirements

For correct resolving destination through pipe, set options.ext to empty string in tateru.config.json.

{
  "options": {
    "data": {},
    "src": "example/src/twig",
    "ext": ""
  }
}

You can find an example of a complete file in the fixtures: test/fixtures/tateru.config.json.

Basic usage

const { src, dest } = require("gulp");
const { gulpTateruCli } = require("gulp-tateru-cli");

const build = function build() {
  return src(["tateru.config.json"], {
    cwd: ".",
  })
    .pipe(gulpTateruCli())
    .pipe(dest("dist"));
};

With options

Plugin gulp-tateru-cli supports TypeScript, so you can use type annotations in your gulp files for better type safety and developer experience.

const { src, dest } = require("gulp");
const { gulpTateruCli } = require("gulp-tateru-cli");

/** @type {import('gulp-tateru-cli').GulpTateruCliOptions} */
const options = {
  env: "prod",
  lang: "cs",
};

const build = function build() {
  return src(["tateru.config.json"], {
    cwd: ".",
  })
    .pipe(gulpTateruCli(options))
    .pipe(dest("dist"));
};

Format contents

const { src, dest } = require("gulp");
const { gulpTateruCli } = require("gulp-tateru-cli");
const { html, js } = require("js-beautify");

/** @type {import('gulp-tateru-cli').Formatter} */
const formatContents = (contents, fileType) => {
  if (fileType && ["html", "xml"].includes(fileType)) {
    return html(contents, {
      indent_size: 4,
    });
  }

  if (fileType && ["json", "webmanifest"].includes(fileType)) {
    return js(contents, {
      indent_size: 2,
    });
  }

  return contents;
};

/** @type {import('gulp-tateru-cli').GulpTateruCliOptions} */
const options = {
  formatter: formatContents,
};

const build = function build() {
  return src(["tateru.config.json"], {
    cwd: ".",
  })
    .pipe(gulpTateruCli(options))
    .pipe(dest("dist"));
};

API

Options

env?: 'prod' | 'dev' | string

Optional. The environment to use from tateru.config.json. Example: dev, prod.

lang?: 'en' | 'cs' | string

Optional. The language to use from tateru.config.json for the generated files. Example: 'en', 'fr', 'es', etc.

page?: 'homepage' | 'about' | string

Optional. The page to use from tateru.config.json for the generated files. Example: 'home', 'about', 'contact', etc.

formatter?: (contents: string, fileType?: string) => string;

Optional. The formatter function to use for formatting the generated files, before minification.

  • contents - The contents of the file to format.
  • fileType - The file type to minify. Example: 'html', 'json', 'webmanifest', etc.
minify?: (contents: string, fileType?: string) => string;

Optional. The minify function to use for minifying the generated files.

  • contents - The contents of the file to minify.
  • fileType - The file type to minify. Example: 'html', 'json', 'webmanifest', etc.

Contributing

Want to contribute? Feel free to open an issue or pull request on GitHub! 🚀 We welcome bug reports, feature requests, and code contributions.

  1. Fork the repo
  2. Create a new branch (git checkout -b feature-branch)
  3. Make your changes
  4. Commit the changes (git commit -m "Add new feature")
  5. Push to the branch (git push origin feature-branch)
  6. Open a pull request 🚀

Support

If you have any questions or need help, feel free to open an issue on GitHub or contact me via GitHub profile.

License

MIT License © 2025 Daniel Sitek