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

create-ts-lib-cli

v1.0.1

Published

CLI for creating TypeScript libraries

Downloads

2

Readme

Certainly. Here's the README.md content in English:

create-ts-lib-cli

ts-lib-scaffold is a command-line interface (CLI) tool for creating TypeScript libraries. It helps developers quickly set up the basic structure of a TypeScript library project and configure common development tools.

Features

  • Quickly create TypeScript library project structure
  • Automatically configure TypeScript, ESLint, Prettier, Jest, and other development tools
  • Support for monorepo structure
  • Integrated GitHub Actions for continuous integration
  • Use Rollup for building, supporting multiple output formats (ESM, CommonJS, UMD)

Installation

npm install -g ts-lib-scaffold

Usage

ts-lib-cli <project-name>

After running the command, the CLI will guide you through the project creation process, including:

  1. Entering project description
  2. Entering author name
  3. Choosing whether to use Jest for testing
  4. Choosing whether to initialize a Git repository

Project Structure

The created project will contain the following main files and directories:

<project-name>/
├── .github/
│   └── workflows/
│       ├── lint-and-type.yml
│       └── test.yml
├── src/
│   └── hello.ts
├── .gitignore
├── babel.config.js
├── eslint.config.mjs
├── jest.config.ts
├── package.json
├── rollup.config.js
├── tsconfig.json
└── README.md

Development Scripts

The project includes the following common npm scripts:

"scripts": {
  "typecheck": "tsc",
  "typecheck:ci": "pnpm -r --parallel run typecheck",
  "build": "concurrently 'pnpm:build:*'",
  "build:zustand": "rollup -c --package zustand",
  "test": "jest --passWithNoTests --config jest.config.ts",
  "prettier": "prettier '**/{examples,src,__tests__,website}/**/*.{js,jsx,ts,tsx,md}' --write",
  "prettier:ci": "prettier '**/{examples,src,__tests__,website}/**/*.{js,jsx,ts,tsx,md}' --list-different",
  "eslint": "eslint '**/src/*.{js,jsx,ts,tsx}'",
  "eslint:ci": "eslint '**/src/*.{js,jsx,ts,tsx}'"
}

Configuration Files

The project includes the following main configuration files:

  • tsconfig.json: TypeScript configuration
  • eslint.config.mjs: ESLint configuration
  • babel.config.js: Babel configuration
  • rollup.config.js: Rollup build configuration
  • jest.config.ts and jest.preset.js: Jest test configuration

GitHub Actions

The project automatically configures two GitHub Actions workflows:

  1. Test workflow: Runs tests on push to main branch or PR creation
  2. Code check workflow: Runs lint and type checking on push to main branch or PR creation

Contributing

Issues and pull requests are welcome to improve this project.

License

This project is licensed under the MIT License. See the LICENSE file for details.


This README.md provides basic information about the project, installation and usage instructions, project structure, development scripts, and an overview of the main configuration files. You can further refine or modify this README file as needed.