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

@dfordev/typescript-node-module-seed

v0.2.0

Published

Seed repo for new node modules using Typescript

Readme

Typescript npm module seed

NPM Version Build Status Coverage Maintainability unstable

Typescript module seed

Features

  • Developping:
    • Latest typescript version
    • Multiple tsconfig files
  • Testing: mocha/chai for testing
    • ts-node for on-the-fly test compilation
    • code coverage with istanbul
  • Publishing proper .npmignore so published module only has the necessary sources
  • Continuous integration with travis CI

Project architecture

  • dist : distribution folder (build folder)
  • gen: contains generated files
    • coverage: code coverage report
  • src: your source folder
  • test: Test folder
    • testcase contains testing file
    • bootstrap.ts bootstrap file for tests
    • mocha.opts mocha options file

Starting a new project

  • git clone the repository
  • remove .git and add your own repository
  • npm install

Development

Add new typings file

TODO

Build

npm run build

Generated file can be found in ./dist directory.

Test

It uses mocha for testing. Files that ends with .spec.ts are test file (See mocha option file ./test/mocha.opts).

Use the following shortcuts to run tests:

  • npm run test - Tests only

Code coverage

  • npm run cover - Run tests with coverage
  • npm run show-coverage - Show code coverage report (Located in ./gen/coverage)

If you want to set up code coverage measurements in a project, there are usually 4 things that you’ll need:

  • a test runner: mocha
  • a code coverage tool istanbul/nyc, to generate code coverage reports. With a code reporter for coveralls: mocha-lcov-reporter
  • a code coverage insight service Coveralls, to provide you a nice visualization of your code coverage data
  • a reporting tool node-coveralls, codecov.io, to send your reports to some service

For more information about code coverage see this article.

Continous Integration

With gitflow way

Reminder: This approach uses two branches to track the history of the project. While the master branch contains tags and/or commits that record the project's official release history, a shared integration branch (usually called "develop") gives your team a place to ferret out bugs and incompatible changes. More info here

You must have git flow extension installed. See here.

  • First update package version Use `npm version [patch|minor|major]. It will:

    • Bumps the version in package.json (the patch part)
    • Creates a commit with specified message
    • Tags that commit with the new version
  • Push to remote git push --tags

Versioning

Version should follow semver format. As a reminder, here the summary of how it works: Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards-compatible manner, and
  • PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

Or using standard-version

Commands

All commands in package.json

  • npm run build - run tsc

  • npm run build:watch - run tsc in watch-mode

  • npm run clean - delete build directory

  • npm run lint - runs tslint

  • npm test - run mocha on all *.ts files in test/

  • npm run node - run ts-node to get a REPL or run a script, e.g. a spike: npm run node src/spikes/consolespike.ts

  • npm run test:watch - re-run mocha on all *.ts files in test/ everytime a file changes

License

MIT © Stéphane Léonard