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

Commit

Permalink
refactor: Apply webpack-defaults (#167)
Browse files Browse the repository at this point in the history
 - 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`.
  • Loading branch information
joshwiens authored Jun 7, 2017
1 parent 743aef2 commit 632ed72
Show file tree
Hide file tree
Showing 17 changed files with 5,667 additions and 320 deletions.
35 changes: 35 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"presets": [
[
"env",
{
"useBuiltIns": true,
"targets": {
"node": "4.3"
},
"exclude": [
"transform-async-to-generator",
"transform-regenerator"
]
}
]
],
"plugins": [
[
"transform-object-rest-spread",
{
"useBuiltIns": true
}
]
],
"env": {
"test": {
"presets": [
"env"
],
"plugins": [
"transform-object-rest-spread"
]
}
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[.md]
insert_final_newline = false
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "webpack",
"rules": {
"no-undefined": 0
}
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
yarn.lock -diff
* text=auto
bin/* eol=lf
package-lock.json -diff
20 changes: 6 additions & 14 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<!-- Before creating an issue please make sure you are using the latest version of file-loader. -->
<!--
1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).
2. If the issue is still there, write a minimal project showing the problem and expected output.
3. Link to the project and mention Node version and OS in your report.
**Do you want to request a *feature* or report a *bug*?**
<!-- Please ask questions on StackOverflow or the webpack Gitter (https://gitter.im/webpack/webpack). Questions will be closed. -->

**What is the current behavior?**

**If the current behavior is a bug, please provide the steps to reproduce.**
<!-- A great way to do this is to provide your configuration via a GitHub gist. -->

**What is the expected behavior?**

**If this is a feature request, what is motivation or use case for changing the behavior?**

**Please mention other relevant information such as your webpack version, Node.js version and Operating System.**
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
-->
23 changes: 5 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->

**What kind of change does this PR introduce?**
<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->

**Did you add tests for your changes?**

**If relevant, did you update the README?**

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->

**Does this PR introduce a breaking change?**
<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->

**Other information**
<!--
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.
2. Check out the [development guide](https://webpack.js.org/development/) for the API and development guidelines.
3. Read through the PR diff carefully as sometimes this can reveal issues. The work will be reviewed, but this can save some effort.
-->
20 changes: 14 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# development
/node_modules
/coverage
*.log

# dotfiles
.*
!.gitignore
*~
*#*
logs
*.log
npm-debug.log*
yarn-debug.log*
.eslintcache
/dist
/local
/reports
.DS_Store
Thumbs.db
.idea
.vscode
*.sublime-project
*.sublime-workspace
31 changes: 18 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,29 @@ branches:
matrix:
fast_finish: true
include:
# - os: linux
# node_js: "7"
# env: WEBPACK_VERSION="2.2.0" JOB_PART=lint
- os: linux
node_js: "6"
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
node_js: '8'
env: WEBPACK_VERSION="2.6.0" JOB_PART=lint
- os: linux
node_js: "4.3"
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
node_js: '4.3'
env: WEBPACK_VERSION="2.6.0" JOB_PART=test
- os: linux
node_js: "7"
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
node_js: '6'
env: WEBPACK_VERSION="2.6.0" JOB_PART=test
- os: linux
node_js: '8'
env: WEBPACK_VERSION="2.6.0" JOB_PART=coverage
before_install:
- 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi'
- nvm --version
- node --version
- npm --version
before_script:
- 'if [ "$WEBPACK_VERSION" ]; then npm install webpack@^$WEBPACK_VERSION; fi'
- |-
if [ "$WEBPACK_VERSION" ]; then
npm i --no-save webpack@^$WEBPACK_VERSION
fi
script:
- npm run travis:$JOB_PART
# after_success:
# - bash <(curl -s https://codecov.io/bash)
- 'npm run travis:$JOB_PART'
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
34 changes: 21 additions & 13 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
# appveyor file
# http://www.appveyor.com/docs/appveyor-yml
branches:
only:
- master

init:
- git config --global core.autocrlf input

# what combinations to test
environment:
matrix:
- nodejs_version: 0.10
- nodejs_version: 0.11

# combinations having this can fail
matrix:
allow_failures:
- nodejs_version: 0.11
- nodejs_version: 8
webpack_version: 2.6.0
job_part: test
- nodejs_version: 6
webpack_version: 2.6.0
job_part: test
- nodejs_version: 4.3
webpack_version: 2.6.0
job_part: test

install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- ps: Install-Product node $env:nodejs_version x64
- npm install

build: off


matrix:
fast_finish: true

before_test:
- cmd: npm install webpack@^%webpack_version%

test_script:
- node --version
- npm --version
- cmd: npm test
- cmd: npm run appveyor:%job_part%
80 changes: 0 additions & 80 deletions index.js

This file was deleted.

Loading

0 comments on commit 632ed72

Please sign in to comment.