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

@acoustic-content-sdk/hbs-tooling

v9.0.10076

Published

Utility functions to implement handlebars based tooling functionality.

Downloads

89

Readme

npm

Utility functions to implement handlebars based tooling functionality.

API Documentation

Home > @acoustic-content-sdk/hbs-tooling

hbs-tooling package

Utility functions to implement handlebars based tooling functionality.

Functions

| Function | Description | | --- | --- | | createCompiler(aHandlebars) | Constructs a handlebars compiler | | rxApplyTemplates(aCtx$, aTemp$) | Applies templates to a set of contexts | | rxReadTemplates(aDir, aHandlebars) | Reads a list of files and interprets them as templates, both in the filename and the content. |

Variables

| Variable | Description | | --- | --- | | VERSION | Version and build number of the package |

Type Aliases

| Type Alias | Description | | --- | --- | | HandlebarsType | Type definition on the handlebars API | | TemplateDescriptor | Representation of a file descriptor with templates for both the file name and the file content. | | TemplateType | Type definition on the handlebars template function that transforms a context into a markup string |

Home > @acoustic-content-sdk/hbs-tooling > createCompiler

createCompiler() function

Constructs a handlebars compiler

Signature:

export declare function createCompiler(aHandlebars?: HandlebarsType): UnaryFunction<string, TemplateType>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aHandlebars | HandlebarsType | optionally a handlebars instance |

Returns:

UnaryFunction<string, TemplateType>

the compiler

Home > @acoustic-content-sdk/hbs-tooling > rxApplyTemplates

rxApplyTemplates() function

Applies templates to a set of contexts

Signature:

export declare function rxApplyTemplates(aCtx$: Observable<any>, aTemp$: Observable<TemplateDescriptor>): Observable<FileDescriptor<string>>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aCtx$ | Observable<any> | the set of contexts | | aTemp$ | Observable<TemplateDescriptor> | the set of templates |

Returns:

Observable<FileDescriptor<string>>

the final data stream

Home > @acoustic-content-sdk/hbs-tooling > rxReadTemplates

rxReadTemplates() function

Reads a list of files and interprets them as templates, both in the filename and the content.

Signature:

export declare function rxReadTemplates(aDir: string, aHandlebars?: HandlebarsType): Observable<TemplateDescriptor>;

Parameters

| Parameter | Type | Description | | --- | --- | --- | | aDir | string | directory to start in | | aHandlebars | HandlebarsType | optionally the handlebars instance |

Returns:

Observable<TemplateDescriptor>

the compiled templates

Home > @acoustic-content-sdk/hbs-tooling > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/hbs-tooling > HandlebarsType

HandlebarsType type

Type definition on the handlebars API

Signature:

export declare type HandlebarsType = ReturnType<typeof create>;

Home > @acoustic-content-sdk/hbs-tooling > TemplateDescriptor

TemplateDescriptor type

Representation of a file descriptor with templates for both the file name and the file content.

Signature:

export declare type TemplateDescriptor = [TemplateType, TemplateType];

Home > @acoustic-content-sdk/hbs-tooling > TemplateType

TemplateType type

Type definition on the handlebars template function that transforms a context into a markup string

Signature:

export declare type TemplateType = ReturnType<typeof compile>;