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

create-jtemplate

v1.0.6

Published

Initialize a new project from jtemplate boilerplate

Readme

create-jtemplate

A CLI tool to initialize a new project from jtemplate boilerplate.

Usage

# Using npm init (recommended)
npm init jtemplate <project-name>

# Or with options (note the -- separator)
npm init jtemplate -- --h5 my-h5-project
npm init jtemplate -- --web --dev my-project

# Or using npx
npx create-jtemplate <project-name>

# Or install globally
npm install -g create-jtemplate
create-jtemplate <project-name>

# Show help
npm init jtemplate -- --help

Options

| Option | Description | |--------|-------------| | --web | Initialize only web directory (no backend) | | --h5 | Initialize H5 mobile template | | --dev | Auto install dependencies and start dev server | | --test | Test mode, output parsed arguments only | | --help | Show help message |

Quick Start

# Initialize a full-stack project
npm init jtemplate my-project

# Initialize only web directory (no backend)
npm init jtemplate -- --web my-web-project

# Initialize H5 mobile template
npm init jtemplate -- --h5 my-h5-project

# Initialize and auto-start dev server
npm init jtemplate -- --dev my-project
npm init jtemplate -- --web --dev my-web-project

How it works

  1. First attempt: Tries to clone from the primary repository via SSH:

    [email protected]:jvfe/base/template/boilerplate.git
  2. Fallback: If the primary repository is unavailable or you don't have SSH access, it automatically falls back to:

    https://cnb.cool/yc_null/base/template
  3. Clean up: After cloning, the .git directory is removed to give you a fresh start.

  4. Options handling:

    • --web: Only copies the web directory content to the target directory, suitable for front-end only projects
    • --h5: Clones from the H5 template repository for mobile web projects
    • --dev: Automatically installs dependencies and starts the development server after initialization

Option Details

--web

Initializes only the web directory from the template, excluding the backend part. This is ideal for front-end only projects where you don't need the backend code.

Example:

create-jtemplate --web my-web-project

--h5

Initializes a project from the H5 template repository. This is designed for H5 mobile web projects.

Repository: [email protected]:js-group/base/h5-template.git

Requirements:

  • SSH key must be configured (no fallback available)

Example:

create-jtemplate --h5 my-h5-project

--dev

Automatically installs dependencies and starts the development server after initialization. It checks if pnpm is installed and uses it if available, otherwise falls back to npm.

Behavior:

  • For regular projects: Executes npm run install:all or pnpm run install:all:pnpm
  • For web-only projects: Executes npm install or pnpm install directly in the web directory
  • After installation: Starts the development server with npm run dev

Example:

create-jtemplate --dev my-dev-project

Combined usage

You can combine both options to create a web-only project and start the development server immediately:

Example:

create-jtemplate --web --dev my-web-dev-project

Requirements

  • Node.js >= 14.0.0
  • Git installed and available in PATH

Repository Priority

Default Mode

The tool attempts repositories in this order:

  1. Primary (SSH): [email protected]:jvfe/base/template/boilerplate.git

    • Requires SSH key configured
    • Faster and more secure
  2. Fallback (HTTPS): https://cnb.cool/yc_null/base/template

    • No authentication required
    • Public access

H5 Mode (--h5)

When using --h5 option, the tool clones from:

  • H5 Template (SSH): [email protected]:js-group/base/h5-template.git
    • Requires SSH key configured
    • No fallback available

License

MIT