Gathering detailed insights and metrics for dotignorefile
Gathering detailed insights and metrics for dotignorefile
Gathering detailed insights and metrics for dotignorefile
Gathering detailed insights and metrics for dotignorefile
npm install dotignorefile
Typescript
Module System
Node Version
NPM Version
TypeScript (68.64%)
JavaScript (31.36%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
32 Commits
1 Forks
1 Watchers
2 Branches
1 Contributors
Updated on Dec 08, 2023
Minified
Minified + Gzipped
Latest Version
0.0.6
Package Id
dotignorefile@0.0.6
Unpacked Size
10.63 kB
Size
4.30 kB
File Count
8
NPM Version
10.2.3
Node Version
20.10.0
Published on
Dec 08, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
.ignorefile
The ignore file not to be ignored (relevant thread)
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.
.ignorefile
?It looks something like this:
1[git] 2.env 3 4[prettier] 5.task/ 6.turbo/ 7 8[docker] 9node_modules/ 10 11[eslint] 12dist/
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).
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:
1[docker ./packages/website/] 2node_modules/ 3dist/
This would generate a .dockerignore
file in the ./packages/website/
directory with the contents of the section.
The command for generating the file will be ran like so (it's a WIP, use --help
for docs):
1npx dotignorefile@latest
You may also use this as a postinstall hook in your project. In your package.json
:
1{ 2 "scripts": { 3 "postinstall": "dotignorefile" 4 }, 5 "dependencies": { 6 "dotignorefile": "latest" 7 } 8}
1# Ensure you're on the right Node version 2nvm install 3# enable Corepack so pnpm gets installed automatically 4corepack enable 5# Build project (or `pnpm dev` for watch mode) 6pnpm build
1pnpm changeset
No vulnerabilities found.
No security vulnerabilities found.