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

@stencila/dev-config

v3.0.4

Published

Shared development configurations for Stencila projects

Downloads

449

Readme

@stencila/dev-config

This repository contains configuration settings for various development tools used across Stencila projects. This allows to avoid boilerplate when creating projects, have consistent settings across projects, and simplify workflows in general.

Install

This package requires running a command to finish the installation. The command will modify your project:

  • by adding or changing configuration properties to package.json (e.g. a prettier property that points to the Prettier configuration in this project)'
  • by adding missing config files like .editorconfig

To install run the following commands:

npm install @stencila/dev-config --save-dev
node -e 'require("@stencila/dev-config")'

If you decide you want to update your package.json at a later time, you can run the above command again.

Note that this package includes configurations for Typescript, Jest and related tooling but does not assume that you will be using them. Configurations for these can be copied over manually e.g.

cp node_modules/@stencila/dev-config/{tsconfig.json,typedoc.json} .

You'll also have to make these devDependencies of your project e.g.

npm install --save-dev typescript ts-node jest ts-jest @types/jest typedoc

Tools

Most of these are setup automatically, on installation, or by running init.js.

EditorConfig

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles.

The .editorconfig file from this repo is copied into the root of your project by init.js. Note the VSCode config in this repo includes a recommendation to install the EditorConfig.EditorConfig extension. This will attempt to override user/workspace settings with settings found in the .editorconfig file.

Prettier

Pettier is an opinionated code formatter which supports many languages, integrates with most editors, and has few options. Why? You press save and code is formatted. No need to discuss style in code review. Saves you time and energy. And more ...

This repo includes a configuration file for Prettier, prettier-config.json. To enable it, add the following to your package.json (this is done for you by init.js).

  // …
  "prettier": "@stencila/dev-config/prettier-config.json"
  // …

ESLint

👋 Requires manual installation

The pluggable linting utility for JavaScript and JSX [and Typescript]

Please see the @stencila/eslint-config README for how to install the shared configuration for ESLint.

Husky

Husky is "Git hooks made easy". We use it with pretty-quick (to lint staged files) and commitlint (to lint commit messages) .To enable Husky add the following to your project's package.json (this is done for you by init.js),

For monorepos, it is recommended to install Husky only once at the root of the repository.

# Install Husky
npm install husky@latest --save-dev

# If installing in a new project:
# Ensure that commit messages follow a Semantic Commit message structure
npx husky add .husky/commit-msg "npx --no-install commitlint --edit $1"
# Run Prettier over staged files before committing them
npx husky add .husky/pre-commit "npx --no-install pretty-quick --staged"

# If upgrading an existing Husky installation
npx husky-init
npm exec -- github:typicode/husky-4-to-7 --remove-v4-config
# You will likely have to edit the generated git hooks,
# please follow the instructions printed and use the hook commands above as a reference

Semantic Release

👋 Requires manual installation

semantic-release automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package. This removes the immediate connection between human emotions and version numbers, strictly following the Semantic Versioning specification.

Please see the @stencila/semantic-release-config README for how to use the shared configuration for Semantic Release.