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

auth0-toolkit

v0.0.1-alpha.61

Published

A toolkit for common scripts used at Auth0

Downloads

15

Readme


Inspired by "Tools without config", "The Melting Pot of JavaScript", and kcd-scripts.

Usage

  1. Create a project:
    • npm init new-auth0-project
    • If it's a TypeScript project: add types into package.json. For example:
      • { "types": "lib/index" }
  2. Install auth-toolkit:
    • npm install --save-dev auth0-toolkit
  3. Run the initialization script:
    • npx auth0-toolkit init
  4. Use included scripts:
    • npm run build -- --watch
    • npm run build:doc
    • npm run validate
    • npm run format
    • npm run lint
    • ... etc.

Configuration

This toolkit exposes a bin called auth0-toolkit. All scripts are stored in lib/scripts and all configuration files are stored in lib/config.

The toolkit determines whether a project is a TypeScript project or JavaScript project depending on whether the types property exists in package.json.

All included tools can have their configuration overwritten by adding flags to the command or by including configuration files in the root of your project. For example: running auth0-toolkit format will run Prettier with the included configuration, but having a .prettierrc in your project will cause the toolkit to use that configuration instead.

Overriding Configuration

During the toolkit setup process, configuration files for the libraries used by the toolkit are created in the project root. Libraries natively supporting an "extend" feature will use those by default to allow for toolkit configuration to be used as a starting point.

All configuration can be overridden with configuration files, package.json properties, or arguments passed to the toolkit binary.

API

Modules

build

Properties

| Name | Default | Description | | ------------ | ---------------- | --------------------------------------------------------------------------------------- | | [--out-dir] | lib | Output destination for built files. (Babel) | | [--outDir] | lib | Output destination for built files. (Typescript) | | [--no-clean] | | If present, does not clean target directory. | | [OTHERS] | | All CLI options used by related binary. (tsc or babel) |

Example

$ npm run build -- --watch --preserveWatchOutput
$ npx auth0-toolkit build
$ npx auth0-toolkit build --watch --preserveWatchOutput

doc

Properties

| Name | Description | | -------- | ---------------------------------------------------------------------- | | [OTHERS] | All CLI options used by related binary. (jsdoc2md) |

Example

$ npm run build:doc
$ npx auth0-toolkit doc

format

Properties

| Name | Description | | ------------ | ------------------------------------------------------------------------------------ | | [--no-write] | If provided, files will not be written to disk. (Defaults to writing to disk) | | [OTHERS] | All CLI options used by the related binary. (prettier) |

Example

$ npm run format
$ npx auth0-scripts format

init

Properties

| Name | Description | | ------------ | ----------------------------------------------------------------------------------------------- | | [...files] | Files to lint | | [--no-cache] | Disables ESLint --cache arg which is added by this script. | | [OTHERS] | All CLI options used by the related binary. (eslint or tslint) |

Example

$ npx auth0-toolkit init

lint

Properties

| Name | Description | | ------------ | ----------------------------------------------------------------- | | [...files] | A list of files to lint. | | [--no-cache] | Disables ESLint's --cache arg. | | [OTHERS] | All CLI options used by related binary. (TSLint or ESLint) |

Example

$ npm run lint
$ npm run lint my-file.ts -- --config my-config.json
$ npx auth0-toolkit lint
$ npx auth0-toolkit lint --no-cache
$ npx auth0-toolkit lint my-file.ts

precommit

Properties

| Name | Description | | -------- | ----------------------------------------------------------------------------- | | [OTHERS] | All CLI options used by the related binary. (lint-staged) |

test

Properties

| Name | Description | | ------------ | ---------------------------------------------------------------------- | | [--no-watch] | If provided, tests run once. (Default is watch mode) | | [OTHERS] | All CLI options used by the related binary. (jest) |

Example

$ npm run test
$ npx auth0-toolkit test

validate

Properties

| Name | Description | | ------------ | --------------------------------------------- | | [...scripts] | A list of scripts to specifically run. |

Example

$ npm run validate custom-validator
$ npx auth0-toolkit validate
$ npx auth0-toolkit validate custom-validator,another-validator

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.