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

jambo

v1.12.6

Published

A JAMStack implementation using Handlebars

Downloads

2,733

Readme

Jambo

Jambo is a JAMStack implementation using Handlebars.

Installation

Install jambo from npm, and save it to your package.json as a dev-dependency.

npm install -D jambo

Usage

Jambo has 6 official commands: init, import, override, page, build, and upgrade.

Init

npx jambo init

Initiailizes the current directory as a Jambo repository.

The init command initializes a Jambo repo, and also imports the designated theme. Currently, only answers-hitchhiker-theme is supported.

Optional Arguments

--themeUrl theme_url

The git URL of the theme to import, if a theme should be imported on init.

--useSubmodules true/false

If importing a theme on init, whether to import it as a git submodule as opposed to regular files. Defaults to false.

Import

npx jambo import --themeUrl https://github.com/yext/answers-hitchhiker-theme.git

The import command imports the designated theme into the 'themes' folder.

--themeUrl theme_url

The git URL of the theme to import.

Optional Arguments

--useSubmodules true/false

Whether to import the theme as a git submodule, as opposed to regular files. Defaults to false.

Override

npx jambo override --theme answers-hitchhiker-theme

The override command lets you override a specified theme by copying its files into the overrides folder.

--theme theme_name

The name of the theme to override.

Optional Arguments

--path path_to_override

You can specify specific files(s) in the theme to override.

Page

npx jambo page --name new_page_name

The page command registers a new page, with the specified name, to be built by Jambo.

--name page_name

The name this page will be registered as.

- Optional Arguments

--template template_name

The template to generate the page with.

--layout layout_name

The layout to use around the page.

Build

npx jambo build

The build command builds all pages reigstered within Jambo, and places them inside the 'public' directory. The public directory will be cleared prior to each build, so any static assets in that directory will need to be re-generated.

The build command uses the 'defaultTheme' attribute in the jambo.json in Jambo's root directory, which must be added to jambo.json manually. Here is an example jambo.json.

{
  "dirs": {
    "themes":"themes",
    "cards": "cards",
    "config":"config",
    "overrides":"overrides",
    "output":"public",
    "pages":"pages",
    "layouts":"layouts"
  },
  "defaultTheme": "answers-hitchhiker-theme"
}
Helpers

The build command registers a few handlebars helpers for convenience:

  • json(context): Renders the context as JSON
  • ifeq(arg1, arg2, options): if arg1 == arg2 then options.fn, otherwise options.inverse
  • read(fileName): Reads contents of the given fileName
  • concat(prefix, id): Concatenates prefix + id
  • babel(options): Adds babel transforms to the given code with the options given
  • partialPattern(cardPath, opt)
  • deepMerge(...args): Performs a deep merge of the given objects

Note: The babel helper does not polyfill all necessary functionality needed for IE11 for example. You should use global polyfills if you wish to use them in the code. For example, you might want to import core-js/stable.

Upgrade

npx jambo upgrade

The upgrade command updates your current defaultTheme to the latest version. It will also automatically execute the theme's upgrade.js script.

Optional Arguments

--disableScript true/false

You can disable automatic execution of the upgrade.js script in the theme. Defaults to false.

--isLegacy true/false

You can signal whether to pass an --isLegacy flag to the theme's upgrade.js. This can be useful when you need different/additional upgrade logic to upgrade from older versions of a theme. Defaults to false.