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

dotignorefile

v0.0.6

Published

An ignore file not to be ignored

Downloads

24

Readme

.ignorefile

The ignore file not to be ignored (relevant thread)

.ignorefile example

This is an attempt to make a standard for various ignore files in a single .ignorefile file. It is an INI-like file where contained in each section is the content of that specific ignore file.

This repository also serves as a tool to read the .ignorefile (as a step to be run with some postinstall or git hook) and generate the specific ignore files as utilized by applications, while also appending to or creating a .gitignore file that ignores the ignore files, so they're not uploaded to git.

It's created in TypeScript to iterate quickly but may be rewritten in a language like Go should this become useful.

What is .ignorefile?

It looks something like this:

[git]
.env

[prettier]
.task/
.turbo/

[docker]
node_modules/

[eslint]
dist/

It is formatted like an INI file, where each section is the name of the ignore file (without the "ignore" suffix) and the contents are the those of the specific ignore file (not the typical key/value pair given in an INI formatted file).

Additional Syntax Proposals

These are some ideas for additional syntax of the .ignorefile file.

Support subdirectories: While files like .gitignore can be put in the root of the project, files like .dockerignore need to be placed in the root of the build context, resulting in more ignore files littered throughout a project. Consider a syntax like so:

[docker ./packages/website/]
node_modules/
dist/

This would generate a .dockerignore file in the ./packages/website/ directory with the contents of the section.

Get Started

The command for generating the file will be ran like so (it's a WIP, use --help for docs):

npx dotignorefile@latest

You may also use this as a postinstall hook in your project. In your package.json:

{
  "scripts": {
    "postinstall": "dotignorefile"
  },
  "dependencies": {
    "dotignorefile": "latest"
  }
}

Development

# Ensure you're on the right Node version
nvm install
# enable Corepack so pnpm gets installed automatically
corepack enable
# Build project (or `pnpm dev` for watch mode)
pnpm build

Release

pnpm changeset