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

vs-new

v2.0.2

Published

Set up a development directory with everything you need to get started with TypeScript development and debugging using VS Code

Downloads

30

Readme

vs-new

Set up a blueprint folder ready to go for TypeScript Node.js development in VS Code.

This package lets you deploy a pre-configured directory structure including:

  • Boilerplate README markdown file
  • blank git repository, with a .gitignore that ignores ./node_modules/, ./build/ and the ./coverage directories
  • .vscode folder with:
    • pre-configured launch.json file with a debug-current-working-file config
    • pre-configured tasks.json that defines a tsc-watch task for background TypeScript compiling
    • some recommended vscode extensions that you may find useful for generic Typescript development
  • pre-configured tsconfig.json that auto-includes all .ts files under ./src
  • package.json file
    • includes dependencies for TypeScript development & debugging, testing with Jest, and ts-node & typescript packages for debugging .ts files directly in VS Code
    • Auto-populates the package name and author name (using your Windows username)
  • ./src/test/test.ts includes boilerplate Jest test

Installation

Install as a global command line tool:

npm i -g vs-new

Usage

From your parent Projects directory:

vs-new my-new-project

will create a new directory named my-new-project, will insert that name into the package.json file, and will use your Windows username to populate the Author field. All other boilerplate files will be copied into the directory.

Revisions

2.0.2

  • Added dev instructions to this repo's README
  • Removed superfluous console.log() call

2.0.0

  • Replace mocha with jest as the test runner
  • Run npm i ... to install all the dev dependencies in the resulting project, rather than just copying a static package.json file
    • This allows the user to always start with the latest versions of all these packages
  • Added a helper library and a sample unit test which better demonstrate the unity test functionality
  • Added recommended VS Code extensions to support generic Typescript development.

1.2.2

  • Moved all @types dependencies in the generated package.json file to devDependencies

1.2.1

  • Added shebang to main.js and bin field to package.json, which are required for npm i -g ./ to work
  • .gitignore file is now being generated correctly.

1.1.4

  • Improved README
  • Blueprint README file now also auto-populates the package name.

1.1.0

  • Added content to blueprint README file
  • Made the boilerplate Mocha tests runnable
  • Fixed path to test folder in blueprint launch.json
  • Added error handling on retrieving Windows username
  • Now script will run git init in the deployed directory, rather than attempting to copy a blank .git folder
  • Launch.json now uses the integrated terminal by default instead of the debugger console, in order to allow for debugging of interactive CLI apps
  • Fixed typo in deployed package.json (main.ts -> main.js)
  • Fixed typo in README

1.0.2

Added ts-node and typescript packages to the dev-dependencies so that the "Launch current file with ts-node" launch config will work out-of-the-box.

Development

  1. Clone this repo
  2. npm install
  3. Make changes, most likely to the contents of the ./blueprint dir and to ./src/main.ts
  4. Compile with npx tsc
  5. Test your changes from the parent of this repo's directory, using ./vs-new/build/main.js dummyProject to create a new project locally
  6. When you're happy with your changes, describe the changes in README.md and git commit the changes
  7. Run npm version <patch/minor/major> to autocommit a version increment of package.json
  8. git push these changes to GitHub and npm publish the latest version to npm.