Skip to content

Commit

Permalink
refactor: apply webpack-defaults (#54)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
joshwiens committed Jun 24, 2017
1 parent cc4524d commit f6f8c6c
Show file tree
Hide file tree
Showing 16 changed files with 5,655 additions and 107 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
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "webpack",
"rules": {
"consistent-return": 1,
"global-require": 1,
"no-undef": 1,
"no-param-reassign": 1,
"import/no-extraneous-dependencies": 1
}
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
* text=auto

yarn.lock -diff
bin/* eol=lf
package-lock.json -diff
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
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.
**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**
-->
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!--
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.
-->
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
/node_modules

logs
*.log
npm-debug.log*
yarn-debug.log*
.eslintcache
/coverage
/dist
/local
/reports
.DS_Store
Thumbs.db
.idea
.vscode
*.sublime-project
*.sublime-workspace
48 changes: 48 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
sudo: false
dist: trusty
language: node_js
branches:
only:
- master
jobs:
fast_finish: true
allow_failures:
- env: WEBPACK_VERSION=canary
include:
- &test-latest
stage: Webpack latest
nodejs: 6
env: WEBPACK_VERSION=latest JOB_PART=test
script: npm run travis:$JOB_PART
- <<: *test-latest
nodejs: 4.3
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
script: npm run travis:$JOB_PART
- <<: *test-latest
node_js: 8
env: WEBPACK_VERSION=latest JOB_PART=coverage
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
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 i --no-save webpack@$WEBPACK_VERSION
fi
script:
- 'npm run travis:$JOB_PART'
after_success:
- 'bash <(curl -s https://codecov.io/bash)'
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Copyright JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person obtaining
Expand Down
28 changes: 28 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
branches:
only:
- master
init:
- git config --global core.autocrlf input
environment:
matrix:
- nodejs_version: '8'
webpack_version: latest
job_part: test
- nodejs_version: '6'
webpack_version: latest
job_part: test
- nodejs_version: '4.3'
webpack_version: latest
job_part: test
build: 'off'
matrix:
fast_finish: true
install:
- ps: Install-Product node $env:nodejs_version x64
- npm install
before_test:
- cmd: npm install webpack@%webpack_version%
test_script:
- node --version
- npm --version
- cmd: npm run appveyor:%job_part%
96 changes: 0 additions & 96 deletions index.js

This file was deleted.

Loading

0 comments on commit f6f8c6c

Please sign in to comment.