Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@putout/plugin-npmignore NPM version

Use a .npmignore file to keep stuff out of your package. If there's no .npmignore file, but there is a .gitignore file, then npm will ignore the stuff matched by the .gitignore file.

(c) npmjs.com

🐊Putout plugin helps with .npmignore.

Install

npm i @putout/plugin-npmignore -D

Rules

Config

{
    "rules": {
        "npmignore/add": ["on", {
            "dismiss": [
                ".nyc_output",
                ".putoutcache",
                "*.swp",
                "coverage",
                "*.config.*"
            ]
        }],
        "npmignore/sort": "on",
        "npmignore/convert-loc-to-lock": "on"
    }
}

add

Adds .* into .npmignore.

+.*
test

sort

❌ Example of incorrect code

node_modules
*.swp
yarn-error.log
yarn.lock
.idea
.DS_Store
deno.lock

coverage
.filesystem.json

✅ Example of correct code

.idea
.filesystem.json
.DS_Store

*.swp

yarn-error.log
yarn.lock
deno.lock

node_modules
coverage# sort

convert-loc-to-lock

Adds .* into .npmignore. Checkout in 🐊Putout Editor.

-*.loc
+*.lock

License

MIT