-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from chrisblossom/2.0
2.0 plugin revamp
- Loading branch information
Showing
33 changed files
with
2,403 additions
and
739 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,30 @@ | ||
'use strict'; | ||
|
||
const nodeVersion = require('./dev-utils/node-version'); | ||
|
||
const babel = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: nodeVersion, | ||
}, | ||
}, | ||
], | ||
'@babel/preset-typescript', | ||
], | ||
overrides: [ | ||
{ | ||
test: ['./src/clean-webpack-plugin.ts'], | ||
plugins: [ | ||
[ | ||
'babel-plugin-add-module-exports', | ||
{ addDefaultProperty: true }, | ||
], | ||
], | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = babel; |
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,66 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
# | ||
# Caching environmental variable workaround: | ||
# https://discuss.circleci.com/t/cannot-use-circle-yml-environment-variables-in-cache-keys/10994/9 | ||
# | ||
|
||
version: 2 | ||
jobs: | ||
test-node6: | ||
docker: | ||
- image: circleci/node:6 | ||
steps: | ||
- checkout | ||
- run: node --version > _node_version && npm --version > _npm_version && cat _node_version && cat _npm_version | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }} | ||
- run: node --version && npm --version | ||
- run: npm install | ||
- save_cache: | ||
paths: | ||
- ~/.npm | ||
key: v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }} | ||
- run: npm run test.ci | ||
test-node8: | ||
docker: | ||
- image: circleci/node:8 | ||
steps: | ||
- checkout | ||
- run: node --version > _node_version && npm --version > _npm_version && cat _node_version && cat _npm_version | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }} | ||
- run: node --version && npm --version | ||
- run: npm install | ||
- save_cache: | ||
paths: | ||
- ~/.npm | ||
key: v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }} | ||
- run: npm run test.ci | ||
test-node10: | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- run: node --version > _node_version && npm --version > _npm_version && cat _node_version && cat _npm_version | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }} | ||
- run: node --version && npm --version | ||
- run: npm install | ||
- save_cache: | ||
paths: | ||
- ~/.npm | ||
key: v1-dependencies-{{ checksum "_node_version" }}-{{ checksum "_npm_version" }} | ||
- run: npm run test.ci | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- test-node6 | ||
- test-node8 | ||
- test-node10 |
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,22 @@ | ||
# http://editorconfig.org/ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
# The indentation in package.json will always need to be 2 spaces | ||
# https://github.com/npm/npm/issues/4718 | ||
[package.json] | ||
indent_style = space | ||
indent_size = 2 |
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,8 @@ | ||
.cache | ||
.idea | ||
.vscode | ||
node_modules | ||
coverage | ||
dist | ||
package.json | ||
package-lock.json |
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,24 @@ | ||
'use strict'; | ||
|
||
const eslint = { | ||
extends: '@chrisblossom/eslint-config', | ||
overrides: [ | ||
{ | ||
files: ['dev-utils/**/*.js', 'dev-utils/**/.*.js'], | ||
parserOptions: { | ||
sourceType: 'script', | ||
}, | ||
rules: { | ||
strict: ['error', 'safe'], | ||
'import/no-extraneous-dependencies': 'off', | ||
'node/no-unpublished-require': 'off', | ||
|
||
'node/no-unsupported-features/es-builtins': 'error', | ||
'node/no-unsupported-features/es-syntax': 'error', | ||
'node/no-unsupported-features/node-builtins': 'error', | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = 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 |
---|---|---|
@@ -1,29 +1,14 @@ | ||
.idea | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
/config | ||
/coverage | ||
.DS_Store | ||
node_modules | ||
*.swp | ||
*.log | ||
.env | ||
dist | ||
*.ignore | ||
.idea | ||
.vscode | ||
.cache | ||
package-lock.json | ||
yarn.lock |
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,10 @@ | ||
'use strict'; | ||
|
||
const husky = { | ||
hooks: { | ||
'pre-commit': 'npm run git-pre-commit', | ||
'pre-push': 'npm run git-pre-push', | ||
}, | ||
}; | ||
|
||
module.exports = husky; |
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,10 @@ | ||
'use strict'; | ||
|
||
const lintStaged = { | ||
'*.{js,mjs,jsx,ts,tsx,json,scss,less,css,md,yml,yaml}': [ | ||
'prettier --write', | ||
'git add', | ||
], | ||
}; | ||
|
||
module.exports = lintStaged; |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
package-lock=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,10 @@ | ||
.cache | ||
.idea | ||
.vscode | ||
node_modules | ||
coverage | ||
dist | ||
static | ||
package.json | ||
package-lock.json | ||
__sandbox__ |
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 @@ | ||
'use strict'; | ||
|
||
const prettier = { | ||
semi: true, | ||
tabWidth: 4, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
arrowParens: 'always', | ||
overrides: [ | ||
{ | ||
files: ['*.js', '.*.js'], | ||
excludeFiles: ['*/**', '*/.**'], | ||
options: { | ||
trailingComma: 'es5', | ||
}, | ||
}, | ||
{ | ||
files: ['dev-utils/**/*.js', 'dev-utils/**/.*.js'], | ||
options: { | ||
trailingComma: 'es5', | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = prettier; |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
--no-lockfile true |
Oops, something went wrong.