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

gulp-tl-combine

v2.0.0

Published

A plugin for Gulp to combine data definition files for TurnsLift addons.

Downloads

5

Readme

npm version

gulp-tl-combine

TurnsLift plugin for gulp.

The purpose of this gulp plugin is to combine data definition files used in the TurnsLift platform into a standard JSON representation. This representation is the format expected by the TurnsLift platform to merge and upgrade schemas, queries and views for data access.

Usage

First, install gulp-tl-combine as a development dependency:

npm install --save-dev gulp-tl-combine

Then, add it to your gulpfile.js:

var tlcombine = require("gulp-tl-combine");

gulp.src("./src/*.json")
	.pipe(tlcombine("output_file_name.json"))
	.pipe(gulp.dest("./dist"));

Create the following directory structure in your application. Files placed into these directories will be processed by this plugin into the desired output file.

|- data
  |- entities
  | |- (json schema files)...
  |- entity-patches
  | |- (entity-patch files)...
  |- queries
  | |- (SQL query statements in files that end with *.sql extension)
  |- views
  | |- (json design documents containing view definitions)

API

jsoncombine(fileName, options)

fileName

Type: String

The output filename

options.dataConverter(data)

Type: Function

This function acts as a reducer function. All of the collected data is passed into this function as the data object when the stream is closed. The keys of the data object will be the names of the files (sans the '.json' postfix).

The function should return a new Buffer that would be writter to the output file.

options.pathConverter(file)

Type: Function

file is just vinyl

This function can be used to transform physical file names into some other key. This function should return a String that will become the key of the data object passed to dataConverter.

options.fileParser(file)

Type: Function

file is just vinyl

This function is responsible for reading a given file and returning proper JSON that can be used as the value assigned to the data object send to dataConverter.

License

See LICENSE file for details.