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

npm-lib-boilerplate

v1.0.1

Published

Starter kit to build NPM modules with ease

Downloads

8

Readme

npm-lib-boilerplate

Travis Codecov version downloads license semantic-release

This project provides the boilerplate code needed for making an NPM module.

Usage

  1. Fork this repository to your git account
  2. Change remote set URL to your own repository
  3. Change package.json, readme.md and license with your project relevant information
  4. Replace contents in src/data.json, src/index.js and src/index.test.js as per your requirements
  5. Install dependencies
npm install

Dependencies

Modules for development

  1. Transpiler:
    • "babel-cli" -> Command Line Interface for Babel (Convert ES6 -> ES5)
    • "babel-loader" -> Babel Module Loader for Webpack
    • "babel-plugin-istanbul" -> Babel plugin to add Istanbul Instrumentation to ES6
    • "babel-preset-es2015" -> Babel preset for all ES6 plugins
    • "babel-register" -> Babel require hook
  2. Testing:
    • "chai" -> Test framework agnostic BDD/TDD assertion library
    • "mocha" -> Light-weight JS test framework
    • "nyc" -> Command Line Interface for Istanbul (Code coverage instrument) (Configuration : .nycrc)
    • "codecov" -> Upload code coverage report to Codecov
  3. Linting:
    • "eslint" -> AST based pattern checker for JavaScript
  4. Package Manager:
    • "webpack" -> pack commonJS/AMD modules for browser
    • "json-loader" -> JSON loader module for Webpack
  5. Release Automation:
    • "ghooks" -> set Git hooks for automation
    • "commitizen" -> Git commit message with standard convention format
    • "cz-conventional-changelog" -> commitizen adapter for conventional changelog format
    • "validate-commit-msg" -> validate commit message as per conventional changelog standard
    • "semantic-release" -> automated NPM package publisher
  6. Utilities:
    • "rimraf" -> deep deletion module platform-independent
    • "cross-env" -> set node environment variables platform-independent
    • "npm-run-all" -> Command Line Interface to run multiple npm-scripts in parallel or sequential

Configuration Files

  1. .travis.yml -> automation script for Travis CI
  2. .babelrc -> options to configure Babel Transpiler
  3. .nycrc -> options to configure Istabul Code Coverage Reporter
  4. .eslintrc -> options for ES Lint checking tool
  5. test/mocha.opts -> options for mocha test framework
  6. webpack.config.babel.js -> options for Webpack module bundler
  7. .gitattributes -> attributes to configure git
  8. .gitignore -> ignore generated files and folders

Generated Files

  1. .nyc_output/ -> garbage output from istanbul instrumentation
  2. node_modules/ -> npm modules installation directory
  3. coverage/ -> lcov report for istanbul code coverage
  4. dist/ -> output files for ditribution