Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 plugin revamp #99

Merged
merged 16 commits into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions .babelrc.js
@@ -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;
66 changes: 66 additions & 0 deletions .circleci/config.yml
@@ -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
22 changes: 22 additions & 0 deletions .editorconfig
@@ -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
8 changes: 8 additions & 0 deletions .eslintignore
@@ -0,0 +1,8 @@
.cache
.idea
.vscode
node_modules
coverage
dist
package.json
package-lock.json
24 changes: 24 additions & 0 deletions .eslintrc.js
@@ -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;
41 changes: 13 additions & 28 deletions .gitignore
@@ -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
10 changes: 10 additions & 0 deletions .huskyrc.js
@@ -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;
10 changes: 10 additions & 0 deletions .lintstagedrc.js
@@ -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;
2 changes: 0 additions & 2 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
package-lock=false
10 changes: 10 additions & 0 deletions .prettierignore
@@ -0,0 +1,10 @@
.cache
.idea
.vscode
node_modules
coverage
dist
static
package.json
package-lock.json
__sandbox__
26 changes: 26 additions & 0 deletions .prettierrc.js
@@ -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;
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc
@@ -0,0 +1 @@
--no-lockfile true