Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 292e217

Browse files
committed
refactor: Apply webpack-defaults (#542)
- refactor: Migrate extracted module to lib - refactor: Migrate order undefined to lib - refactor: Extract etwp helper functions - refactor: Extract compilation to stand alone class - refactor: Proxy plugin module from cjs.js - refactor: Modernize loader syntax - Convert to ES6+ Class - Convert to ES6+ default export - Convert to const / let - Uses import syntax - Convert errors to templates - refactor: Convert tests & configs to import syntax - refactor: Use indexOf in helpers - refactor: Modernize plugin syntax - Convert to ES6+ Class - Convert to ES6+ default export - Convert to const / let - Uses import syntax - Convert errors to templates - refactor: Modernize ExtractedModule syntax - Convert to ES6+ Class - Convert to ES6+ default export - Convert to const / let - Uses import syntax - Convert errors to templates - refactor: Removes fallbackLoader & loader deprecation warnings - refactor: Removes single option deprecation warning - refactor: Removes options.loader & options.fallbackLoader 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`
1 parent 92e4349 commit 292e217

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+7274
-1124
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: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
1+
# editorconfig.org
42
root = true
53

6-
# Unix-style newlines with a newline ending every file
74
[*]
85
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
98
end_of_line = lf
109
insert_final_newline = true
11-
indent_style = tab
12-
indent_size = 4
10+
trim_trailing_whitespace = true
1311

14-
# Matches the exact files either package.json or .travis.yml
1512
[{package.json,.travis.yml}]
1613
indent_style = space
1714
indent_size = 2
15+
16+
[.md]
17+
insert_final_newline = false
18+
trim_trailing_whitespace = false

.eslintignore

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

.eslintrc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"env": {
3-
"node": true
4-
},
5-
"rules": {
6-
"strict": 0,
7-
"curly": 0,
8-
"quotes": 0,
9-
"no-shadow": 0,
10-
"no-underscore-dangle": 0
11-
}
2+
"extends": "webpack",
3+
"rules": {
4+
"prefer-destructuring": 1,
5+
"prefer-rest-params": 0,
6+
"class-methods-use-this": 1,
7+
"no-plusplus": 1,
8+
"consistent-return": 0,
9+
"no-param-reassign": 0
10+
}
1211
}

.gitattributes

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

.github/ISSUE_TEMPLATE.md

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
<!--
12
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.
23
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
34
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
4-
4. Remove these instructions from your PR as they are for your eyes only.
5+
-->

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,16 @@
88
/.idea
99

1010
.DS_Store
11+
12+
logs
13+
*.log
14+
npm-debug.log*
15+
.eslintcache
16+
/dist
17+
/local
18+
/reports
19+
Thumbs.db
20+
.idea
21+
.vscode
22+
*.sublime-project
23+
*.sublime-workspace

.travis.yml

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

ExtractedModule.js

Lines changed: 0 additions & 70 deletions
This file was deleted.

OrderUndefinedError.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

appveyor.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
branches:
2+
only:
3+
- master
4+
- feature/webpack3
5+
init:
6+
- git config --global core.autocrlf input
7+
environment:
8+
matrix:
9+
- nodejs_version: '8'
10+
webpack_version: latest
11+
job_part: test
12+
- nodejs_version: '6'
13+
webpack_version: latest
14+
job_part: test
15+
build: 'off'
16+
matrix:
17+
fast_finish: true
18+
install:
19+
- ps: Install-Product node $env:nodejs_version x64
20+
- npm i -g npm@^5.0.0
21+
- npm install
22+
before_test:
23+
- cmd: npm install webpack@%webpack_version%
24+
test_script:
25+
- node --version
26+
- npm --version
27+
- cmd: npm run appveyor:%job_part%

0 commit comments

Comments
 (0)