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

prometheus-es6

v1.0.0

Published

A starter boilerplate for NPM modules. Includes a few goodies to get you going like ES6, commands for running tests/linting/builds/examples/CI/coverage/publishing, and more.

Downloads

6

Readme

Logo

Prometheus

A starter boilerplate for creating NPM modules. Includes a few goodies to get you going like ES6 ready, ES5 compatibility and compilation, NPM Commands, and more!

Build Status devDependencies Status Coverage Status Known Vulnerabilities

Want to create your own NPM module but have no idea where to start? Hate how tedious it is recreating common project files? Would you rather watch paint dry than setting up yet ANOTHER ES6 compatible development environment? My friend, you've come to the right place. This repo takes care of all the initial fluff with none of the initial fuss.


Requirements

IMPORTANT: READ FIRST!

This project runs using the latest stable version of NodeJS. To see what version of NodeJS is currently running on your system, run node -v in your terminal application.

Current Stable Version of NodeJS: Node Version

Update your systems version of NodeJS to match the version listed above before continuing.


Features

Check out the Feature Details section of this README for additional information regarding individual feature default configurations and, if needed, how to go about reconfiguring individual features for your project needs. To see a complete list of the available NPM commands provided by default in this project and what they do, check out the NPM Commands section of this README.

  • ES6
  • Backwards compatibility for older versions of NodeJS
  • ES6 => ES5 production build ready
  • Testing
  • Linting
  • All the basic, but necessary, NPM commands for writing code from development to production ready! Plus, hooks for publishing to NPM!
  • A folder for working examples of your module other Devs can use as reference.
  • Tutorials for configuring/reconfiguring everything here along the way included inside! Plus, nice NPM commands for removing all excess tutorial code when you're ready to get rollin' like a pro.
  • Code Coverage
  • Continuos Integration

Installation

To get started with your new project, run the following commands:

git clone https://github.com/DaneTheory/Prometheus.git <YOUR_PROJECT_NAME>
cd <path/to/YOUR_PROJECT_NAME>
rm -rf .git
npm i

And that's it! Edit the package.json file with your own project information.


Feature Details

ES6

ES6 support provided via Babel using babel-preset-env. To edit or add to preset configurations, edit the .babelrc file found in the root folder of this project.

TESTING

Mocha is included by default for writing and running tests. However, this repo is compatible with any testing framework you prefer! Just swap out Mocha as a project dependency with your favorite testing framework. Then, make any pre-configuration edits your testing framework may need. As a bonus, all tests can be written in ES6!

LINTING

ESLint is included by default for code linting. To edit or add to preset configurations, edit the .eslintrc file. The .eslintignore file can be used to define files/folders where you wish linting rules to be ignores. Both the .eslintrc and .eslintignore files can be found in the root folder of this project. Preconfiguration for linting provided via AirBnB.

CODE COVERAGE

Code Coverage provided via Istanbul. As a plus, ES6 code support is included in coverage!

CONTINUOS INTEGRATION

Continuos Integration, a.k.a CI, provided via TravisCI.


NPM Commands

npm run clean

Removes the ./lib/ directory.

npm run test

Runs tests.

npm run test:watch

Runs your tests, and then has them re-run on any file changes.

npm run lint

Runs linting against codebase.

npm run build

Compiles all development code in ./src to ES5. Then, the compiled code is output to the newly created lib directory found at the root of this project.

npm run coverage

Runs code coverage.

npm run coverage:open

Opens code coverage report in browser as a human readable report.

npm run prepare

Hooks for module publication to NPM. Runs all checks (tests/linting) first and then, if successful, publishes to NPM.

npm run test:examples

Runs tests against examples provided in ./examples/ directory.


Developing

To start development on your project, run the following command:

npm run dev

Your project is now running in development mode! Get to makin' some sexy code.


Testing

To run tests, run the following command:

npm run test

Your project tests status will output to the console. Pro-Tip: Run the following command to run tests that re-run on each file change!

npm run test:watch

Production Build

To create a production ready version of your project, run the following command:

npm run build

A production ready version of your project is now ready! You can find it in the lib folder located at the root of your project directory.


Deployment / Publication

To publish your project to NPM, run the following command:

npm run prepare

That's it! Your beautiful new project is now available as a brand new sweet NPM module! Grab a beer, you deserve it!


TODO

  • [X] Change logo to something better
  • [X] Fix Travis CI to connect to repo and reflect status in README correctly
  • [X] Add other status descriptors like Travis CI to README
  • [ ] Update docs with better info and tutorials
  • [ ] Swap out npm in favor of yarn
  • [ ] Add env variable configuration for each build mode
  • [ ] Add NPM commands to run development version of project
  • [ ] Add NPM commands to strip out demo code/comments
  • [ ] Better folder hierarchy
  • [ ] Better way to consolidate NPM commands?
  • [ ] NPM command to start new project that includes console prompts to handle manual file edits for project info automatically.
  • [X] Add better markdown for README. (i.e. checkboxes for README)
  • [ ] Add better README boilerplate. Best practices and such.
  • [ ] Add better package.json boilerplate. Best practices and such.
  • [ ] Add better .babelrc, .editorconfig, .eslintignore, .eslintrc, .gitignore, .travis.yml, CONTRIBUTING.md, etc. following best practices and such.
  • [ ] Add NPM command publish or deploy to hook into NPM
  • [ ] Add git hook for Github integration
  • [X] Update Istanbul to newer NYC. Then, include lcov reporter. Then, create NPM command to open coverage test output HTML. Then, include Coveralls support with status descriptor in README.

Contributing

I created this project to end the constant boilerplate syndrome that comes with starting new projects and plan on keeping it constantly active.

This project is completely open to new contributers. Got a way to improve this project? Check out CONTRIBUTING.md for details to add your own idea!


Issues / Bugs

To report any issues or bugs, please visit: Issue tracker: https://github.com/DaneTheory/Prometheus/issues


Licensing

The code in this project is licensed under MIT license.