This repository was archived by the owner on Jan 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support ignore plugin by filter
- Loading branch information
0 parents
commit 23b7cfc
Showing
14 changed files
with
7,870 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
|
||
[Makefile] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
"browser": true, | ||
"node": true, | ||
"commonjs": true, | ||
"es6": true | ||
}, | ||
plugins: ['prettier'], | ||
extends: [ | ||
'airbnb-base', | ||
'eslint-config-prettier' | ||
], | ||
rules: { | ||
'prettier/prettier': ['error'], | ||
'no-return-assign': ['error', 'except-parens'], | ||
'no-shadow': 'off', | ||
'no-param-reassign': 'off', | ||
'no-use-before-define': ["error", { "functions": false }], | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Include your project-specific ignores in this file | ||
# Read about how to use .gitignore: https://help.github.com/articles/ignoring-files | ||
|
||
build | ||
database.sqlite | ||
node_modules | ||
ncp-debug.log | ||
npm-debug.log | ||
|
||
# nyc | ||
coverage | ||
.nyc_output | ||
|
||
# IDE | ||
.idea | ||
.vscode | ||
|
||
.DS_Store | ||
|
||
tmp | ||
|
||
*.zip | ||
*.tgz | ||
|
||
/.nyc_output | ||
|
||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"bracketSpacing": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "node" | ||
- "lts/*" | ||
|
||
cache: | ||
directories: | ||
- "node_modules" | ||
after_script: | ||
- npm run coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[](https://travis-ci.org/wmzy/rollup-plugin-by-output) | ||
[](https://coveralls.io/github/wmzy/rollup-plugin-by-output?branch=master) | ||
# rollup-plugin-by-output | ||
|
||
> Apply Rollup Plugin by OutputOptions | ||
## Install | ||
|
||
```bash | ||
npm i -D rollup-plugin-by-output | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
// rollup.config.js | ||
import babel from 'rollup-plugin-babel'; | ||
import terser from 'rollup-plugin-terser'; | ||
import plugins from 'rollup-plugin-by-output'; | ||
|
||
|
||
export default { | ||
// ... | ||
plugins: plugins(babel(), [o => (o.file === pkg.browser), terser()]), | ||
output: { | ||
globals: { | ||
lodash: '_' | ||
}, | ||
name: pkg.name, | ||
file: pkg.browser, | ||
format: 'umd' | ||
}, | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: 'cjs' | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: 'es' | ||
} | ||
] | ||
}; | ||
|
||
``` | ||
## Workflow | ||
```bash | ||
# develop | ||
npm start | ||
|
||
# build | ||
npm run build | ||
|
||
# test | ||
npm test | ||
|
||
# commit changes | ||
npm run commit | ||
|
||
# publish | ||
npm publish | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const pkg = require('./package'); | ||
|
||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/env', | ||
{ | ||
modules: false, | ||
targets: { | ||
node: pkg.engines.node | ||
} | ||
} | ||
] | ||
] | ||
}; |
Oops, something went wrong.