Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

refactor(plugin): v1.0.0 #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"useBuiltIns": true,
"targets": {
"node": "4.3"
"node": "6.9.0"
},
"exclude": [
"transform-async-to-generator",
Expand Down Expand Up @@ -35,7 +35,8 @@
"transform-async-to-generator"
]
}
]
],
"env"
],
"plugins": [
"transform-object-rest-spread"
Expand Down
161 changes: 161 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
unit_tests: &unit_tests
steps:
- checkout
- setup_remote_docker
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: NPM Rebuild
command: npm install
- run:
name: Run unit tests.
command: npm run ci:test
canary_tests: &canary_tests
steps:
- checkout
- setup_remote_docker
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: NPM Rebuild
command: npm install
- run:
name: Install Webpack Canary
command: npm i --no-save webpack@next
- run:
name: Run unit tests.
command: npm run ci:test

version: 2
jobs:
dependency_cache:
docker:
- image: webpackcontrib/circleci-node-base:latest
steps:
- checkout
- setup_remote_docker
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: Install Dependencies
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- ./node_modules

node8-latest:
docker:
- image: webpackcontrib/circleci-node8:latest
steps:
- checkout
- setup_remote_docker
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: NPM Rebuild
command: npm install
- run:
name: Run unit tests.
command: npm run ci:coverage
- run:
name: Submit coverage data to codecov.
command: bash <(curl -s https://codecov.io/bash)
when: on_success
node6-latest:
docker:
- image: webpackcontrib/circleci-node6:latest
<<: *unit_tests
node9-latest:
docker:
- image: webpackcontrib/circleci-node9:latest
<<: *unit_tests
node8-canary:
docker:
- image: webpackcontrib/circleci-node8:latest
<<: *canary_tests
analysis:
docker:
- image: webpackcontrib/circleci-node-base:latest
steps:
- checkout
- setup_remote_docker
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: NPM Rebuild
command: npm install
- run:
name: Run linting.
command: npm run lint
- run:
name: Run NSP Security Check.
command: npm run security
- run:
name: Validate Commit Messages
command: npm run ci:lint:commits
publish:
docker:
- image: webpackcontrib/circleci-node-base:latest
steps:
- checkout
- setup_remote_docker
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: NPM Rebuild
command: npm install
- run:
name: Validate Commit Messages
command: npm run release:validate
- run:
name: Publish to NPM
command: printf "noop running conventional-github-releaser"

version: 2.0
workflows:
version: 2
validate-publish:
jobs:
- dependency_cache
- node6-latest:
requires:
- dependency_cache
filters:
tags:
only: /.*/
- analysis:
requires:
- dependency_cache
filters:
tags:
only: /.*/
- node8-latest:
requires:
- analysis
- node6-latest
filters:
tags:
only: /.*/
- node9-latest:
requires:
- analysis
- node6-latest
filters:
tags:
only: /.*/
- node8-canary:
requires:
- analysis
- node6-latest
filters:
tags:
only: /.*/
- publish:
requires:
- node8-latest
- node9-latest
filters:
branches:
only:
- master
9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
plugins: ['prettier'],
extends: ['@webpack-contrib/eslint-config-webpack'],
rules: {
'prettier/prettier': [
'error',
{ singleQuote: true, trailingComma: 'es5', arrowParens: 'always' },
],
'consistent-return': 1,
'no-param-reassign': 1,
'no-underscore-dangle': 1,
'no-multi-assign': 1,
'import/no-extraneous-dependencies': 1,
},
};
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# These are the default owners for everything in
# webpack-contrib
@webpack-contrib/org-maintainers

# Add repository specific users / groups
# below here for libs that are not maintained by the org.
@boopathi
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always"
}
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ language: node_js
branches:
only:
- master
- next
jobs:
fast_finish: true
allow_failures:
- env: WEBPACK_VERSION=canary
- node_js: 9
include:
- &test-latest
stage: Webpack latest
node_js: 6
env: WEBPACK_VERSION=latest JOB_PART=test
script: npm run travis:$JOB_PART
- <<: *test-latest
node_js: 4.8
env: WEBPACK_VERSION=latest JOB_PART=test
script: npm run travis:$JOB_PART
- <<: *test-latest
node_js: 8
env: WEBPACK_VERSION=latest JOB_PART=lint
Expand All @@ -28,10 +26,13 @@ jobs:
script: npm run travis:$JOB_PART
after_success: 'bash <(curl -s https://codecov.io/bash)'
- stage: Webpack canary
before_script: npm i --no-save git://github.com/webpack/webpack.git#master
script: npm run travis:$JOB_PART
node_js: 8
env: WEBPACK_VERSION=canary JOB_PART=test
env: WEBPACK_VERSION=4.0.0-alpha.0 JOB_PART=test
script: npm run travis:$JOB_PART
- stage: NodeJS Next
node_js: 9
env: WEBPACK_VERSION=latest JOB_PART=test
script: npm run travis:$JOB_PART
before_install:
- 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi'
- nvm --version
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ You can also use [babel-loader](https://github.com/babel/babel-loader) for webpa
[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
[chat-url]: https://gitter.im/webpack/webpack

[test]: https://travis-ci.org/webpack-contrib/babel-minify-webpack-plugin.svg?branch=master
[test-url]: https://travis-ci.org/webpack-contrib/babel-minify-webpack-plugin
[test]: https://circleci.com/gh/webpack-contrib/babel-minify-webpack-plugin.svg?style=svg
[test-url]: https://circleci.com/gh/webpack-contrib/babel-minify-webpack-plugin

[cover]: https://codecov.io/gh/webpack-contrib/babel-minify-webpack-plugin/branch/master/graph/badge.svg
[cover-url]: https://codecov.io/gh/webpack-contrib/babel-minify-webpack-plugin
Expand Down
9 changes: 5 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
branches:
only:
- master
- next
init:
- git config --global core.autocrlf input
environment:
Expand All @@ -11,19 +12,19 @@ environment:
- nodejs_version: '6'
webpack_version: latest
job_part: test
- nodejs_version: '4.8'
webpack_version: latest
- nodejs_version: '8'
webpack_version: next
job_part: test
build: 'off'
matrix:
fast_finish: true
install:
- ps: Install-Product node $env:nodejs_version x64
- npm i -g npm@^5.0.0
- npm i -g npm@latest
- npm install
before_test:
- cmd: npm install webpack@%webpack_version%
test_script:
- node --version
- npm --version
- cmd: npm run appveyor:%job_part%
- cmd: npm run ci:%job_part%
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
codecov:
branch: master
coverage:
precision: 2
round: down
range: 70...100
status:
project: 'no'
patch: 'yes'
comment: 'off'
31 changes: 31 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* eslint-disable */
const Configuration = {
extends: ['@commitlint/config-angular'],

rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [2, 'never', ['start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
},
};

module.exports = Configuration;
Loading