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

custom-ts-template

v0.0.3

Published

Script for creating a custom template for Typescript with CLI

Readme

English

GitHub repo size GitHub language count GitHub pull requests

npx custom-ts-template's repository, which allows user to execute a simple CLI application to customize dependencies installation and generation/settings of tsconfig.json in Typescript projects with or without express.

:computer: About the project

General

The project is still in-progress and has the following functionalities:

  • [x] Custom installation of following libs:
  1. 'dependencies':
  • dotenv (standard)
  • database driver (mysql OR mongodb OR postgres)
  • express

If express is installed, the following options are allowed:

  • http-status-codes
  • express-async-errors
  • restify-errors
  • body-parser
  • cors
  • helmet
  • jsonwebtoken
  • cookie-parser
  • passport
  1. 'devDependencies':
  • @tsconfig/node{chosenNodeVersion} (standard)

  • @types/node (standard)

  • ts-node-dev (standard)

  • typescript (standard)

  • nodemon

If express is installed, the following options are allowed:

  • @types/express (standard if express is installed)
  • @types/restify-errors -> (standard if restify-errors is installed)
  • joi
  • morgan
  • [x] Generation of a tsconfig.json with two possible options:
  • Recommended: generates a tsconfig.json with Typescript's standard config for the chosen node version. Also allows customization of rootDir and outDir of 'compilerOptions' and the 'include' and 'exclude' fields of tsconfig.json.

  • Custom: allows customization of 'compilerOptions' flags: target, module, allowJs, strict, esModuleInterop, skipLibCheck, forceConsistentCasingInFileNames, preserveConstEnums, rootDir e outDir. Also allows customization of 'include' and 'exclude' fields of tsconfig.json.

  • [x] Generates a .gitignore based on Toptal's.

  • [ ] Adds possibility to generate the template in a customized directory.

Techs used

The project have been made in Javascript, and used the following libs:

  • chalk: used to customize terminal colors
  • chalk-animation: used to generate terminal colored animations.
  • figlet: used for ASCII art creation.
  • gradient-string: used for gradient colors creation in terminal.
  • inquirer: biblioteca utilizada para interface de CLI que permite captação simplificada de inputs
  • inquirer: used for CLI interface that allows simplified input capture.
  • nanospinner: used to create 'spinners' that decorates the terminal.

🚀 Installation guidelines

  1. With 'npx': type the command:
npx custom-ts-template

The executable will install the necessary dependencies and automatically launch the Typescript template generation CLI.

IMPORTANT: You need to enter the directory where you want to create the project and then run the command.

or

  1. Type the command:
npm install custom-ts-template

The installer will generate a 'clone' of the project with an index.js file that can be run with npm start. As the central idea of ​​the project is to create files in the root folder in which it is running, this method is not recommended as it will overwrite possible files already initialized by the installation, such as .gitignore, package.json, package-lock.json, etc.

⬆ Back to the top

Português:

Repositório do npx custom-ts-template que permite ao usuário executar uma aplicação simples de CLI para customizar instalação de dependências e criação/configuração do tsconfig.json em projetos Typescript com ou sem express.

:computer: Sobre o projeto

Geral

O projeto ainda está em desenvolvimento e possui as seguintes funcionalidades:

  • [x] Instalação customizada das seguintes bibliotecas:
  1. 'dependencies':
  • dotenv (padrão)

  • driver de banco de dados (mysql OU mongodb OU postgres)

  • express

    Caso o express for instalado, as seguintes opções serão permitidas:

  • http-status-codes

  • express-async-errors

  • restify-errors

  • body-parser

  • cors

  • helmet

  • jsonwebtoken

  • cookie-parser

  • passport

  1. 'devDependencies':
  • @tsconfig/node{versãoEscolhidaDoNode} (padrão)

  • @types/node (padrão)

  • ts-node-dev (padrão)

  • typescript (padrão)

  • nodemon

    Caso o express for instalado, as seguintes opções serão permitidas:

  • @types/express (padrão com a instalação do express)

  • @types/restify-errors -> (padrão com a instalação do restify-errors)

  • joi

  • morgan

  • [x] Geração de um tsconfig.json a partir de duas opções:
  • Recommended: gera um tsconfig.json adequado para a versão do node escolhida anteriormente de acordo com as recomendações de 'bases' do Typescript.
  • Custom: permite a customização das flags de 'compilerOptions': target, module, allowJs, strict, esModuleInterop, skipLibCheck, forceConsistentCasingInFileNames, preserveConstEnums, rootDir e outDir. Também permite a customização dos campos 'include' e 'exclude' do tsconfig.json.
  • [x] Gera um .gitignore de acordo com as recomendações da Toptal.

  • [ ] Adiciona possibilidade de gerar o template em um diretório customizado.

Tecnologias utilizadas

O projeto foi feito em Javascript, utilizando as seguintes bibliotecas:

  • chalk: utilizada parar customizar cores do terminal
  • chalk-animation: usada para criar animações com o objetivo de customizar estilos de terminal
  • figlet: utilizada para criação de arte ASCII
  • gradient-string: utilizada para criar gradiente de cores em output de terminal
  • inquirer: biblioteca utilizada para interface de CLI que permite captação simplificada de inputs
  • nanospinner: utilizada para criação de 'spinners' para enfeitar o terminal

🚀 Orientações de Instalação

  1. Executando com 'npx': Digite o comando:
npx custom-ts-template

O executável irá instalar as dependências necessárias e automaticamente iniciar o CLI de geração de templates Typescript.

IMPORTANTE: Você precisa entrar no diretório que deseja criar o projeto e depois rodar o comando.

ou

  1. Digite o comando:
npm install custom-ts-template

O instalador irá gerar um 'clone' do projeto com um arquivo index.js que pode ser executado com npm start. Como a ideia central do projeto é criar arquivos na pasta raiz na qual está sendo executado, este método não é recomendado pois irá sobrescrever possíveis arquivos já inicializados pela instalação, como o .gitignore, package.json, package-lock.json, etc.

⬆ Voltar ao topo