Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit b46a5c8

Browse files
authored
refactor: upgrade to webpack-defaults (#51)
- Upgrades loader to webpack-defaults - Converts codebase to es6+ JavaScript syntax - Enforces webpack-contrib code style - Refactors to ESModule w/ a CJS proxy BREAKING CHANGE: Enforces Webpack standard NodeJS engines range. at the time of merge `>= 4.3 < 5.0.0 || >= 5.10`. BREAKING CHANGE: Upgrades loader-utils to 1.1.0 which has a minimum NodeJS version of 4.
1 parent f742c3e commit b46a5c8

16 files changed

+5515
-58
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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
; editorconfig.org
1+
# editorconfig.org
22
root = true
33

44
[*]
5+
charset = utf-8
56
indent_style = space
6-
indent_size = 4
7+
indent_size = 2
78
end_of_line = lf
8-
charset = utf-8
9-
trim_trailing_whitespace = true
109
insert_final_newline = true
10+
trim_trailing_whitespace = true
1111

12-
[*.{json,yml,md}]
13-
indent_size = 2
12+
[.md]
13+
insert_final_newline = false
14+
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "webpack"
3+
}

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
yarn.lock -diff
2+
* text=auto
3+
bin/* eol=lf
4+
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,18 @@ tmp/
33
*.sublime-*
44
*.log
55
.DS_Store
6+
7+
logs
8+
npm-debug.log*
9+
yarn-debug.log*
10+
.eslintcache
11+
/coverage
12+
/dist
13+
/local
14+
/reports
15+
/node_modules
16+
Thumbs.db
17+
.idea
18+
.vscode
19+
*.sublime-project
20+
*.sublime-workspace

.travis.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
sudo: false
2+
language: node_js
3+
branches:
4+
only:
5+
- master
6+
matrix:
7+
fast_finish: true
8+
include:
9+
- os: linux
10+
node_js: '8'
11+
env: WEBPACK_VERSION="2.6.0" JOB_PART=lint
12+
- os: linux
13+
node_js: '4.3'
14+
env: WEBPACK_VERSION="2.6.0" JOB_PART=test
15+
- os: linux
16+
node_js: '6'
17+
env: WEBPACK_VERSION="2.6.0" JOB_PART=test
18+
- os: linux
19+
node_js: '8'
20+
env: WEBPACK_VERSION="2.6.0" JOB_PART=coverage
21+
before_install:
22+
- 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi'
23+
- nvm --version
24+
- node --version
25+
- npm --version
26+
before_script:
27+
- |-
28+
if [ "$WEBPACK_VERSION" ]; then
29+
npm i --no-save webpack@^$WEBPACK_VERSION
30+
fi
31+
script:
32+
- 'npm run travis:$JOB_PART'
33+
after_success:
34+
- 'bash <(curl -s https://codecov.io/bash)'

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

0 commit comments

Comments
 (0)