This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 179
refactor: apply webpack-defaults
#35
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
98d2d66
fix(package): mv uglify2 to `dependencies` && update `peerDependencie…
jharris4 be54344
refactor: apply to `webpack-defaults`
bebraw 48f7d94
chore(package): update `webpack-defaults v1.0.1...1.4.0`
michael-ciniawsky 74ea5f1
refactor(package): rm `pre-push` hook
michael-ciniawsky 07ca8fe
chore: rm `yarn.lock`
michael-ciniawsky 0659f13
fix(index): linting
michael-ciniawsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
{ | ||
"presets": [ | ||
"es2015" | ||
[ | ||
"env", | ||
{ | ||
"useBuiltIns": true, | ||
"targets": { | ||
"node": 4.3 | ||
}, | ||
"exclude": [ | ||
"transform-async-to-generator", | ||
"transform-regenerator" | ||
] | ||
} | ||
] | ||
], | ||
"plugins": [ | ||
"syntax-object-rest-spread", | ||
"transform-object-rest-spread" | ||
] | ||
[ | ||
"transform-object-rest-spread", | ||
{ "useBuiltIns": true } | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"presets": ["env"], | ||
"plugins": ["transform-object-rest-spread"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
# editorconfig.org | ||
|
||
[*] | ||
indent_style = tab | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/node_modules | ||
/dist | ||
/examples/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,3 @@ | ||
{ | ||
"root": true, | ||
"plugins": ["node"], | ||
"extends": ["eslint:recommended", "plugin:node/recommended"], | ||
"env": { | ||
"node": true, | ||
"jasmine": true | ||
}, | ||
"rules": { | ||
"quotes": ["error", "double"], | ||
"no-undef": "error", | ||
"no-extra-semi": "error", | ||
"semi": "error", | ||
"no-template-curly-in-string": "error", | ||
"no-caller": "error", | ||
"yoda": "error", | ||
"eqeqeq": "error", | ||
"global-require": "off", | ||
"brace-style": "error", | ||
"eol-last": "error", | ||
"indent": ["error", "tab", { "SwitchCase": 1 }], | ||
"no-extra-bind": "warn", | ||
"no-empty": "off", | ||
"no-multiple-empty-lines": "error", | ||
"no-multi-spaces": "error", | ||
"no-process-exit": "warn", | ||
"space-in-parens": "error", | ||
"no-trailing-spaces": "error", | ||
"no-use-before-define": "off", | ||
"no-unused-vars": ["error", {"args": "none"}], | ||
"key-spacing": "error", | ||
"space-infix-ops": "error", | ||
"no-unsafe-negation": "error", | ||
"no-loop-func": "warn", | ||
"space-before-function-paren": ["error", "never"], | ||
"space-before-blocks": "error", | ||
"object-curly-spacing": ["error", "always"], | ||
"keyword-spacing": ["error", { | ||
"after": false, | ||
"overrides": { | ||
"try": {"after": true}, | ||
"else": {"after": true}, | ||
"throw": {"after": true}, | ||
"case": {"after": true}, | ||
"return": {"after": true}, | ||
"finally": {"after": true}, | ||
"do": {"after": true} | ||
} | ||
}], | ||
"node/no-unpublished-require": 0, | ||
"no-console": "off", | ||
"valid-jsdoc": "error" | ||
} | ||
} | ||
"extends": "webpack" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.** | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,48 @@ | ||
sudo: false | ||
dist: trusty | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "5" | ||
- "6" | ||
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 build | ||
- npm run test:all | ||
- 'npm run travis:$JOB_PART' | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
- 'bash <(curl -s https://codecov.io/bash)' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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 | ||
build: 'off' | ||
matrix: | ||
fast_finish: true | ||
install: | ||
- 'ps: Install-Product node $env:nodejs_version x64' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have to strip the |
||
- npm install | ||
before_test: | ||
- 'cmd: npm install webpack@^%webpack_version%' | ||
test_script: | ||
- node --version | ||
- npm --version | ||
- 'cmd: npm run appveyor:%job_part%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export default function() { | ||
var element = document.createElement("h1"); | ||
export default function () { | ||
const element = document.createElement('h1'); | ||
|
||
element.className = "demo-table"; | ||
element.innerHTML = "Hello world Again"; | ||
element.className = 'demo-table'; | ||
element.innerHTML = 'Hello world Again'; | ||
|
||
return element; | ||
return element; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import component from "./component"; | ||
import component from './component'; | ||
|
||
document.body.appendChild(component()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export default function() { | ||
var element = document.createElement("h1"); | ||
export default function () { | ||
const element = document.createElement('h1'); | ||
|
||
element.className = "demo-button"; | ||
element.innerHTML = "Hello world"; | ||
element.className = 'demo-button'; | ||
element.innerHTML = 'Hello world'; | ||
|
||
return element; | ||
return element; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import component from "./component"; | ||
import component from './component'; | ||
|
||
document.body.appendChild(component()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
var path = require("path"); | ||
const path = require('path'); | ||
const UglifyJSPlugin = require('../'); | ||
|
||
var UglifyJSPlugin = require("../src"); | ||
|
||
var PATHS = { | ||
app: path.join(__dirname, "app"), | ||
another: path.join(__dirname, "another"), | ||
build: path.join(__dirname, "build") | ||
const PATHS = { | ||
app: path.join(__dirname, 'app'), | ||
another: path.join(__dirname, 'another'), | ||
build: path.join(__dirname, 'build'), | ||
}; | ||
|
||
module.exports = [ | ||
{ | ||
entry: { | ||
app: PATHS.app | ||
}, | ||
output: { | ||
path: path.join(PATHS.build, "first"), | ||
filename: "[name].js" | ||
}, | ||
plugins: [ | ||
new UglifyJSPlugin() | ||
] | ||
}, | ||
{ | ||
entry: { | ||
first: PATHS.app, | ||
second: PATHS.another | ||
}, | ||
output: { | ||
path: path.join(PATHS.build, "second"), | ||
filename: "[name].js" | ||
}, | ||
plugins: [ | ||
new UglifyJSPlugin() | ||
] | ||
} | ||
{ | ||
entry: { | ||
app: PATHS.app, | ||
}, | ||
output: { | ||
path: path.join(PATHS.build, 'first'), | ||
filename: '[name].js', | ||
}, | ||
plugins: [ | ||
new UglifyJSPlugin(), | ||
], | ||
}, | ||
{ | ||
entry: { | ||
first: PATHS.app, | ||
second: PATHS.another, | ||
}, | ||
output: { | ||
path: path.join(PATHS.build, 'second'), | ||
filename: '[name].js', | ||
}, | ||
plugins: [ | ||
new UglifyJSPlugin(), | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
var UglifyJSPlugin = require("../src"); | ||
const UglifyJSPlugin = require('../src'); | ||
|
||
exports.minifyJS = function minifyJS(options) { | ||
return { | ||
plugins: [ | ||
new UglifyJSPlugin(options) | ||
] | ||
}; | ||
return { | ||
plugins: [ | ||
new UglifyJSPlugin(options), | ||
], | ||
}; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pickup
webpack-defaults@1.4.0
for all the psudo canary Travis changes.