Skip to content

Commit 8b09362

Browse files
committed
feature(putout) add @putout/plugin-npmignore
1 parent ec2f04d commit 8b09362

File tree

21 files changed

+242
-2
lines changed

21 files changed

+242
-2
lines changed

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
.madrun.js
2-
1+
.*

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@ Next packages not bundled with `putout` but can be installed separately.
10871087
| [`@putout/plugin-add-return-await`](/packages/plugin-add-return-await) | [![npm](https://img.shields.io/npm/v/@putout/plugin-add-return-await.svg?maxAge=86400)](https://www.npmjs.com/package/@putout/plugin-add-return-await) | [![Dependency Status](https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-add-return-await)](https://david-dm.org/coderaiser/putout?path=packages/plugin-add-return-await) |
10881088
| [`@putout/plugin-promises`](/packages/plugin-promises) | [![npm](https://img.shields.io/npm/v/@putout/plugin-promises.svg?maxAge=86400)](https://www.npmjs.com/package/@putout/plugin-promises) | [![Dependency Status](https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-promises)](https://david-dm.org/coderaiser/putout?path=packages/plugin-promises) |
10891089
| [`@putout/plugin-gitignore`](/packages/plugin-gitignore) | [![npm](https://img.shields.io/npm/v/@putout/plugin-gitignore.svg?maxAge=86400)](https://www.npmjs.com/package/@putout/plugin-gitignore) | [![Dependency Status](https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-gitignore)](https://david-dm.org/coderaiser/putout?path=packages/plugin-gitignore) |
1090+
| [`@putout/plugin-npmignore`](/packages/plugin-npmignore) | [![npm](https://img.shields.io/npm/v/@putout/plugin-npmignore.svg?maxAge=86400)](https://www.npmjs.com/package/@putout/plugin-npmignore) | [![Dependency Status](https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-npmignore)](https://david-dm.org/coderaiser/putout?path=packages/plugin-npmignore) |
10901091
| [`@putout/plugin-travis`](/packages/plugin-travis) | [![npm](https://img.shields.io/npm/v/@putout/plugin-travis.svg?maxAge=86400)](https://www.npmjs.com/package/@putout/plugin-travis) | [![Dependency Status](https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-travis)](https://david-dm.org/coderaiser/putout?path=packages/plugin-travis) |
10911092
| [`@putout/plugin-regexp`](/packages/plugin-regexp) | [![npm](https://img.shields.io/npm/v/@putout/plugin-regexp.svg?maxAge=86400)](https://www.npmjs.com/package/@putout/plugin-regexp) | [![Dependency Status](https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-regexp)](https://david-dm.org/coderaiser/putout?path=packages/plugin-regexp) |
10921093

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": [
3+
"plugin:node/recommended",
4+
"plugin:putout/recommended"
5+
],
6+
"plugins": [
7+
"node",
8+
"putout"
9+
]
10+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.nyc_output
3+
*.swp
4+
yarn-error.log
5+
6+
.putoutcache
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use strict';
2+
3+
const {run} = require('madrun');
4+
5+
module.exports = {
6+
'test': () => `tape 'test/*.js' 'lib/**/*.spec.js'`,
7+
'watch:test': async () => `nodemon -w lib -x ${await run('test')}`,
8+
'lint': () => `putout .`,
9+
'fix:lint': () => run('lint', '--fix'),
10+
'coverage': async () => `nyc ${await run('test')}`,
11+
'report': () => `nyc report --reporter=text-lcov | coveralls || true`,
12+
};
13+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.*
2+
*.spec.js
3+
test
4+
fixture
5+
yarn-error.log
6+
7+
madrun.js
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"match": {
3+
"lib/index.js": {
4+
"remove-useless-spread/object": "off"
5+
}
6+
}
7+
}

packages/plugin-npmignore/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) coderaiser
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# @putout/plugin-npmignore [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL]
2+
3+
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-npmignore.svg?style=flat&longCache=true
4+
[NPMURL]: https://npmjs.org/package/@putout/plugin-npmignore"npm"
5+
6+
[DependencyStatusURL]: https://david-dm.org/coderaiser/putout?path=packages/plugin-npmignore
7+
[DependencyStatusIMGURL]: https://david-dm.org/coderaiser/putout.svg?path=packages/plugin-npmignore
8+
9+
`putout` plugin helps with `putout` plugins development.
10+
11+
## Install
12+
13+
```
14+
npm i @putout/plugin-npmignore -D
15+
```
16+
17+
## Rules
18+
19+
```json
20+
{
21+
"rules": {
22+
"npmignore/add-dot-files": "on"
23+
}
24+
}
25+
```
26+
27+
## Add dot files
28+
29+
Adds `.*` into .npmignore.
30+
31+
```diff
32+
+.*
33+
test
34+
```
35+
36+
## License
37+
38+
MIT
39+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__putout_processor_ignore(['.*', 'test']);

0 commit comments

Comments
 (0)