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

ts-strict-setup

v1.5.5

Published

A strict TypeScript project setup with ESLint for everyday use in Node.js projects.

Downloads

14

Readme

ts-strict-setup

FOSSA Status npm version License: GPL-3.0 DeepScan grade DeepSource

ts-strict-setup is a CLI tool that sets up a TypeScript project with a minimal yet well-configured environment in a single command. Perfect for developers who want a quick and efficient way to get started with TypeScript.

Features

  • Creates a well-structured TypeScript project directory.
  • Initializes a new npm project.
  • Configures TypeScript, ESLint, and other essential development tools.
  • Sets up commonly used directories and files.

Installation

You can use npx to run the CLI tool without installing it globally:

Using npx (recommended) Dont worry npx is already installed with npm

To use the CLI tool with npx:

npx ts-strict-setup -y

Run the command and follow the prompts:

npx ts-strict-setup -y

You will be prompted to enter a project name. The tool will then create a new project directory with the following structure:

<project-name>/
├── src/
│   └── index.ts
├── lib/
├── test/
│   └── index.test.ts
├── dist/
├── views/
│   └── index.html
├── .eslintignore
├── eslint.config.js
├── package.json
├── tsconfig.json

Usage

To use the CLI tool, run the following command:

cd <project-name> change the directory
npm run lint

  • To lint the code All the errors will be shown in the terminal

npm run dev

  • To run the code in development mode The Dev mode run the code in .ts files with ts-node

npm run build

  • To build the code the code will be built in the dist folder All the .ts files will be converted to .js files

npm run start

  • To start the code The code will be run in the dist folder

npm run test

  • The test will be run and the output will be shown in the terminal All the test files should be in the test folder and should have the extension .test.ts

Configuration

The tool sets up the following configurations:

  • TypeScript: Configured with tsconfig.json for modern JavaScript features and strict type-checking.
  • ESLint: Configured with eslint.config.js and .eslintignore to enforce code quality and ignore unnecessary files.

TypeScript Configuration

The tsconfig.json file includes settings for:

  • ES6 modules
  • Interoperability with CommonJS modules
  • Strict type-checking
  • Output directory (dist)

ESLint Configuration

The eslint.config.js file includes:

  • Basic TypeScript linting rules
  • Configurations for using TypeScript with ESLint

Tutorials

For a step-by-step guide, check out our YouTube tutorials:

Linux-Based Tutorial

Linux Tutorial

Windows-Based Tutorial

Windows Tutorial

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under GPL-3.0. See the LICENSE file for details.

FOSSA Status

Contact

For questions or support, please contact [email protected] .