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

@gramex/chartvalidate

v1.4.0

Published

A validation library for @gramex charts

Downloads

9

Readme

@gramex/chartvalidate

npm version License

A validation library for @gramex charts.

Example

To validate the contents of your package, run:

npx -y @gramex/chartvalidate

Installation

NO NEED TO INSTALL - npx will automatically install the packages if it's not already installed.

Just run:

npx @gramex/chartvalidate | npx faucet

Tests

This library runs the following tests:

  • package.json should be a valid JSON file
  • package.json "name" property should start with "@gramex/"
  • package.json "version" should be a valid semver and greater than 1.0.0
  • package.json "description" property should exist
  • package.json "module" should begin with "dist/" and end with ".js"
  • package.json "main" should be the same as "module" but end with ".min.js" instead of ".js"
  • package.json "browser" should not be defined
  • package.json "scripts.build" should be defined
  • package.json "scripts.lint" should run prettier and eslint
  • package.json "scripts.prepublishOnly" should lint and build
  • package.json "scripts.prepublish" should not be defined
  • package.json "files" should include "README.md", module, browser
  • package.json "repository" should point to a {type: git, url: "git+https://code.gramener.com/..."}
  • package.json "keywords" should be defined
  • package.json "author" should be defined
  • package.json "license" should be "MIT"
  • package.json "bugs" should point the same code base as repository, but with "/-/issues" added
  • package.json "prettier" should have a "printWidth" of 100 or more
  • package.json "homepage" is at https://gramener.com/gramex-/ (if defined)
  • package.json "publishConfig" should push to https://registry.npmjs.org/
  • .gitlab-ci.yml should be a valid YAML file
  • .gitlab-ci.yml should validate build errors
  • .gitlab-ci.yml should deploy to package.homepage as static (if defined)
  • README.md should begin with a H1 with the package name
  • README.md should have "Example" as the first H2
  • README.md should have the next 2nd-level heading as "Installation"
  • README.md should an "API" 2nd-level heading
  • README.md should end with Release Notes, Authors and License 2nd-level headings

API

Contributing

  • Fork the repository and clone the fork to your machine.
  • Run npm install to install dependencies
  • Edit chartvalidate.js, documenting your changes
  • Push your changes back to your fork on GitHub and submit a pull request to the main repository.

Release

npm version minor
npm publish
git push --follow-tags

Support

If you encounter any problems or have suggestions, please open an issue or submit a pull request.

Release notes

  • 1.4.0: 24 Nov 2023. Use "main" instead of "browser" for IIFE path in package.json
  • 1.3.0: 13 Nov 2023. Add README.md header validations
  • 1.2.0: 1 Nov 2023. Add linting
  • 1.0.0: 31 Oct 2023. Initial release

Authors

License

MIT