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

@intouchg/starter

v0.2.0

Published

CLI for creating new apps with the Intouch Design System

Downloads

3

Readme

@intouchg/starter

CLI for creating new apps with the Intouch Design System

Usage

Creates a new app in a newly created directory project-name:

npx @intouchg/starter <project-name>

Options

  • -t, --template <name> - The template to bootstrap the app with. You can use any template name in the repo. When no template name is passed you will be prompted with a searchable list of all templates.
  • -b, --branch <name> - The template repo branch name to use. Defaults to master.

Creating a template

Create a new directory in the templates directory. The name of the new directory will be the name of the template.

As long as the template requirements are fulfilled, you can put whatever you want in the template directory. Templates are validated with this project's npm prepare script.

Templates also support an optional template.js file in the root of the template directory. See more about the template requirements and optional template.js file below.

Template requirements

  • Must contain a yarn.lock file in the template root
  • Must contain a readme.md file in the template root which contains a string [PROJECT NAME] that will be replaced when boostrapping the app
  • Must contain a package.json file in the template root which contains a "description" property that will be displayed alongside the name of the template in the CLI
  • The template package.json file may include any other properties. When using the CLI to bootstrap a new project, all properties will be carried over into the new project package.json file - except the following properties, which are rewritten: name, version, private, description, repository, author, and license

Optional template.js

The CLI supports an optional template.js file in the root of a template directory that allows for pre- and post-processing during dependency installation. The template.js file is only used for template install operations during the bootstrapping process, and is intentionally not included in the new project directory.

// templates/my-template/template.js
module.exports = {
	preinstall: async (
		process,
		{ projectName, projectPath },
	) => {
		// Runs after the template has been downloaded to the new
		// projectPath but before dependencies are installed
	},
	postinstall: async (
		process,
		{ projectName, projectPath },
	) => {
		// Runs after dependencies are installed
	},
}

Publishing new templates

  1. Add the new template to the @intouchg/starter github repo
  2. Run the npm prepare script and commit the generated lib/templates.json to the repo
  3. Publish a new version of the @intouchg/starter package

Limitations

  • Currently assumes using yarn and package.json
  • Only supports using templates published to the @intouchg/starter github repo

Prior Art