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

node-project-creator

v0.1.1

Published

## Introduction

Downloads

7

Readme

Node Project Creator

Introduction

English 中文文档

This document is written in Chinese and translated to English using Google gemini.

npc is a Node project creation command integration tool that supports creating custom commands.

Example

pnpm add node-project-creator -g
npc

After this, you can create Node projects by selecting commands in your console.

Getting Started

Installation

# pnpm
pnpm add node-project-creator -g

# yarn
yarn add node-project-creator -g

# npm
npm install node-project-creator -g

Usage

# run
npc

# get help
npc -h
# or
npc --help

# show version
npc -v
# or
npc --version

Configuration

  1. un npc -c or npc --configdir to get the location of the custom configuration file.

  2. Create or open the configuration file and edit it.

  3. The configuration file format is roughly as follows:

{
  "commandList": [
    {
      "title": "nextjs app",
      "type": "command",
      "value": "pnpm create next-app@latest",
      "index": 0,
      "override": false
    },
    {
      "title": "cra",
      "type": "repo",
      "value": "https://github.com/facebook/create-react-app.git",
      "index": 0
    },
    {
      "title": "vite app",
      "type": "list",
      "value": [
        {
          "title": "nextjs app",
          "type": "command",
          "value": "pnpm create next-app@latest"
        }
      ]
    }
  ]
}

Configuration option types

interface TBase {
  title: string;
  description?: string;
  index?: number;
  override?: boolean;
}

export interface TValue extends TBase {
  type: 'command' | 'repo';
  value: string;
}

interface Tlist extends TBase {
  type: 'list';
  value: Tcommand[];
}

type Tcommand = TValue | Tlist;

interface TConfig {
  commandList: Tcommand[];
}

配置参数说明

| Option | Type | Required | Default | Description | | ------------- | ----------------------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | title | string | true | undefined | - | | description | string | true | undefined | - | | index | number | false | 0 | Display order | | override | boolean | false | false | When set to false, it will be inserted at the position specified by index. When set to true, it will replace the command at the corresponding position. The project may change the default command list when updating, so it is not recommended to overwrite. | | type | 'command' | 'repo' | 'list' | true | undefined | - | | value | string | Tcommand[] | true | undefined | - |