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

@itsjonq/zero

v5.0.2

Published

A zero config scripts library

Downloads

29

Readme

📦 Zero

Build Status

A zero config scripts library

Zero is a "zero config" tool designed to make it easy to create, develop, test, build, and publish libraries.

It comes with a bunch of modern front-end tools, like Babel, Rollup, ESLint, Prettier, and Jest - All pre-configured to let you build stuff without fiddling with configuration files, scripts and commands.

📦  Zero

zero <command>

Example:
  zero build

Options:
  -V, --version     output the version number
  -h, --help        output usage information

Commands:
  build [options]   Builds project with Babel, Rollup, or TypeScript
  bundle [options]  Bundles project into single files with Rollup
  contributors      Generates markdown file with all contributors
  format [options]  Formats files with Prettier
  lint [options]    Lints files with ESLint
  new               Generate a new module
  pre-commit        Lints files before staging for commit
  prestart          Automatically install dependencies before starting
  release           Publish to npm
  setup [options]   Sets up tooling in project
  test [options]    Run test with Jest
  typecheck         Check types with TypeScript
  validate          Validates project with lint, tests, and build

Table of Contents

Installation

Add Zero to your project with this command:

npm install --save-dev @itsjonq/zero

Or globally with:

npm install -g @itsjonq/zero

Usage

Zero comes with a handful of scripts that you can add to your own package.json scripts:

"scripts": {
  "prestart": "zero prestart",
  "build": "zero build",
  "format": "zero format",
  "lint": "zero lint",
  "precommit": "zero pre-commit",
  "release": "zero release",
  "test": "zero test",
  "validate": "zero validate",
}

CLI

To use Zero as a CLI, install it globally, then run this command:

zero

Alternatively, you can run it with npx

npx @itsjonq/zero

Extending

Zero can build, lint, format, and release out-of-the-box!

If you need to personalize Babel, ESLint, or Jest, Zero's got you covered. Add your own adjustments by extending Zero's based configurations.

Babel

Create a babel or .babelrc file with:

{"presets": ["@itsjonq/zero/babel"]}

babel-core@7

As of version 1.0.0, Zero is now on @babel version 7. Your project may need to install [email protected]. To do so, add that package to your package.json, or run:

npm install --save-dev [email protected]

@babel/runtime

Zero does not use @babel/runtime, as it is still being used to compile projects on Babel 6. If you need an ultra-modern Babel 7 ready tool, check out kcd-scripts.

babel-plugin-react-app

Zero no longer comes with babel-plugin-react-app. The reason is because this module uses @babel/runtime with the new Babel 7 set up. If your project requires babel-plugin-react-app (e.g. building Docz), you'll need to add it yourself as a devDependencies.

ESlint

Create an .eslintrc file with:

{"extends": "./node_modules/@itsjonq/zero/eslint.js"}

Note: for now, you'll have to include an .eslintignore in your project until this eslint issue is resolved.

Jest

Create a jest.config.js file with:

const jestConfig = require('@itsjonq/zero/jest');

module.exports = Object.assign(jestConfig, {
	// your overrides here
});

Prettier

Create a .prettierrc.js file with:

module.exports = require("@itsjonq/zero/prettier");

Thanks

Thanks to kcd-scripts and create-react-app for the inspiration and code!