Skip to content

Commit f6f8c6c

Browse files
authored
refactor: apply webpack-defaults (#54)
- refactor: Apply webpack-defaults - refactor: Removes Zopfli option, which has been extracted to it's own plugin. BREAKING CHANGE: Enforces `peerDependencies` of `"webpack": ">= 3.0.0-rc.0 || ^3.0.0"`. BREAKING CHANGE: Enforces `engines` of `"node": ">=4.3.0 < 5.0.0 || >= 5.10` BREAKING CHANGE: Remove loose dependency on Node Zopfli, which has been extracted to it's own plugin https://github.com/webpack-contrib/zopfli-webpack-plugin Migration: - `npm i -D zopfli-webpack-plugin` - The Zopfli API has remained the same, those who were using the Zopfli option in this plugin should just need to switch plugins.
1 parent cc4524d commit f6f8c6c

16 files changed

+5655
-107
lines changed

.babelrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"useBuiltIns": true,
7+
"targets": {
8+
"node": "4.3"
9+
},
10+
"exclude": [
11+
"transform-async-to-generator",
12+
"transform-regenerator"
13+
]
14+
}
15+
]
16+
],
17+
"plugins": [
18+
[
19+
"transform-object-rest-spread",
20+
{
21+
"useBuiltIns": true
22+
}
23+
]
24+
],
25+
"env": {
26+
"test": {
27+
"presets": [
28+
"env"
29+
],
30+
"plugins": [
31+
"transform-object-rest-spread"
32+
]
33+
}
34+
}
35+
}

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[.md]
12+
insert_final_newline = false
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/dist

.eslintrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "webpack",
3+
"rules": {
4+
"consistent-return": 1,
5+
"global-require": 1,
6+
"no-undef": 1,
7+
"no-param-reassign": 1,
8+
"import/no-extraneous-dependencies": 1
9+
}
10+
}

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
* text=auto
2+
3+
yarn.lock -diff
4+
bin/* eol=lf
5+
package-lock.json -diff

.github/ISSUE_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!--
2+
1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).
3+
2. If the issue is still there, write a minimal project showing the problem and expected output.
4+
3. Link to the project and mention Node version and OS in your report.
5+
6+
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
7+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!--
2+
1. [Read and sign the CLA](https://cla.js.foundation/webpack/webpack.js.org). This needs to be done only once. PRs that haven't signed it won't be accepted.
3+
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
4+
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
5+
-->

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
11
/node_modules
2+
3+
logs
4+
*.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
.eslintcache
8+
/coverage
9+
/dist
10+
/local
11+
/reports
12+
.DS_Store
13+
Thumbs.db
14+
.idea
15+
.vscode
16+
*.sublime-project
17+
*.sublime-workspace

.travis.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
sudo: false
2+
dist: trusty
3+
language: node_js
4+
branches:
5+
only:
6+
- master
7+
jobs:
8+
fast_finish: true
9+
allow_failures:
10+
- env: WEBPACK_VERSION=canary
11+
include:
12+
- &test-latest
13+
stage: Webpack latest
14+
nodejs: 6
15+
env: WEBPACK_VERSION=latest JOB_PART=test
16+
script: npm run travis:$JOB_PART
17+
- <<: *test-latest
18+
nodejs: 4.3
19+
env: WEBPACK_VERSION=latest JOB_PART=test
20+
script: npm run travis:$JOB_PART
21+
- <<: *test-latest
22+
node_js: 8
23+
env: WEBPACK_VERSION=latest JOB_PART=lint
24+
script: npm run travis:$JOB_PART
25+
- <<: *test-latest
26+
node_js: 8
27+
env: WEBPACK_VERSION=latest JOB_PART=coverage
28+
script: npm run travis:$JOB_PART
29+
after_success: 'bash <(curl -s https://codecov.io/bash)'
30+
- stage: Webpack canary
31+
before_script: npm i --no-save git://github.com/webpack/webpack.git#master
32+
script: npm run travis:$JOB_PART
33+
node_js: 8
34+
env: WEBPACK_VERSION=canary JOB_PART=test
35+
before_install:
36+
- 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi'
37+
- nvm --version
38+
- node --version
39+
- npm --version
40+
before_script:
41+
- |-
42+
if [ "$WEBPACK_VERSION" ]; then
43+
npm i --no-save webpack@$WEBPACK_VERSION
44+
fi
45+
script:
46+
- 'npm run travis:$JOB_PART'
47+
after_success:
48+
- 'bash <(curl -s https://codecov.io/bash)'

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Copyright JS Foundation and other contributors
32

43
Permission is hereby granted, free of charge, to any person obtaining

0 commit comments

Comments
 (0)