Skip to content

Commit f4b9d5f

Browse files
committed
Merge branch 'master' into webpack-2
Conflicts: lib/Compilation.js lib/Compiler.js lib/DefinePlugin.js lib/HotModuleReplacementPlugin.js lib/Parser.js lib/node/NodeSourcePlugin.js lib/node/OldNodeWatchFileSystem.js package.json
2 parents 9c26ffe + fc9b941 commit f4b9d5f

File tree

126 files changed

+701
-574
lines changed

Some content is hidden

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

126 files changed

+701
-574
lines changed

.eslintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"rules": {
6+
"strict": 0,
7+
"curly": 0,
8+
"eol-last": 0,
9+
"no-shadow": 0,
10+
"no-redeclare": 1,
11+
"no-extra-bind": 1,
12+
"no-underscore-dangle": 0,
13+
"no-use-before-define": 0,
14+
"consistent-return": 0,
15+
"no-inner-declarations": 1,
16+
"no-loop-func": 1
17+
}
18+
}

.npmignore

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

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,12 @@ language: node_js
33
node_js:
44
- "0.10"
55
- "0.12"
6+
- "iojs"
7+
script: npm run travis
68
env:
79
- NO_WATCH_TESTS=1
10+
11+
before_install:
12+
- '[ "${TRAVIS_NODE_VERSION}" != "0.10" ] || npm install -g npm'
13+
14+
after_success: cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose && rm -rf ./coverage

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![webpack](http://webpack.github.io/assets/logo.png)](http://webpack.github.io)
22

3-
[![NPM version](https://badge.fury.io/js/webpack.png)](http://badge.fury.io/js/webpack) [![Gitter chat](http://img.shields.io/gitter/webpack/webpack.png)](https://gitter.im/webpack/webpack) [![Gittip donate button](http://img.shields.io/gittip/sokra.png)](https://www.gittip.com/sokra/)
3+
[![NPM version][npm-image]][npm-url] [![Gitter chat][gitter-image]][gitter-url] [![Gittip donate button][gittip-image]][gittip-url]
44

55
[documentation](http://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=top)
66

@@ -202,7 +202,7 @@ function loadTemplateAsync (name, callback) {
202202

203203
## Tests
204204

205-
You can run the Node tests with `npm test`. [![build status (linux)](https://secure.travis-ci.org/webpack/webpack.png)](http://travis-ci.org/webpack/webpack) [![Build status (windows)](https://ci.appveyor.com/api/projects/status/vatlasj366jiyuh6/branch/master)](https://ci.appveyor.com/project/sokra/webpack/branch/master)
205+
You can run the Node tests with `npm test`. [![Build status (linux)][travis-image]][travis-url] [![Build status (windows)][appveyor-image]][appveyor-url] [![Test coverage][coveralls-image]][coveralls-url]
206206

207207
You can run the browser tests:
208208

@@ -242,7 +242,7 @@ This is a free-time project. The time I invest in it fluctuates. If you use webp
242242

243243
I'm very thankful for every dollar. If you leave your username or email, I may show my thanks by giving you extra support.
244244

245-
[![Donate to sokra](http://img.shields.io/donate/sokra.png)](http://sokra.github.io/)
245+
[![Donate to sokra][donate-image]][donate-url]
246246

247247

248248
## Dependencies
@@ -257,4 +257,21 @@ I'm very thankful for every dollar. If you leave your username or email, I may s
257257
* [mkdirp](https://github.com/substack/node-mkdirp)
258258
* [clone](https://github.com/pvorb/node-clone)
259259

260-
[![Dependency Status](https://david-dm.org/webpack/webpack.png)](https://david-dm.org/webpack/webpack)
260+
[![Dependency status][david-image]][david-url]
261+
262+
[travis-url]: http://travis-ci.org/webpack/webpack
263+
[travis-image]: https://img.shields.io/travis/webpack/webpack.svg
264+
[appveyor-url]: https://ci.appveyor.com/project/sokra/webpack/branch/master
265+
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true
266+
[coveralls-url]: https://coveralls.io/r/webpack/webpack/
267+
[coveralls-image]: https://img.shields.io/coveralls/webpack/webpack.svg
268+
[npm-url]: https://npmjs.org/package/webpack
269+
[npm-image]: https://img.shields.io/npm/v/webpack.svg
270+
[david-url]: https://david-dm.org/webpack/webpack
271+
[david-image]: https://img.shields.io/david/webpack/webpack.svg
272+
[donate-url]: http://sokra.github.io/
273+
[donate-image]: https://img.shields.io/badge/donate-sokra-brightgreen.svg
274+
[gittip-url]: https://www.gittip.com/sokra/
275+
[gittip-image]: http://img.shields.io/gittip/sokra.svg
276+
[gitter-url]: https://gitter.im/webpack/webpack
277+
[gitter-image]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ init:
77
# what combinations to test
88
environment:
99
matrix:
10-
- nodejs_version: 0.10
1110
- nodejs_version: 0.12
12-
- nodejs_version: 0.13
1311

1412
# combinations having this can fail
1513
matrix:

bm.js

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

examples/coffee-script/cup2.coffee

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
console.log "yeah coffee-script"
2-
3-
module.exports = 42
1+
module

lib/APIPlugin.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,38 @@ function APIPlugin() {
1212
module.exports = APIPlugin;
1313

1414
var REPLACEMENTS = {
15-
__webpack_public_path__: "__webpack_require__.p",
16-
__webpack_modules__: "__webpack_require__.m",
17-
__webpack_chunk_load__: "__webpack_require__.e",
18-
__non_webpack_require__: "require",
19-
"require.onError": "__webpack_require__.onError",
15+
__webpack_public_path__: "__webpack_require__.p", // eslint-disable-line camelcase
16+
__webpack_modules__: "__webpack_require__.m", // eslint-disable-line camelcase
17+
__webpack_chunk_load__: "__webpack_require__.e", // eslint-disable-line camelcase
18+
__non_webpack_require__: "require", // eslint-disable-line camelcase
19+
"require.onError": "__webpack_require__.onError" // eslint-disable-line camelcase
2020
};
2121
var REPLACEMENT_TYPES = {
22-
__webpack_public_path__: "string",
23-
__webpack_require__: "function",
24-
__webpack_modules__: "object",
25-
__webpack_chunk_load__: "function",
22+
__webpack_public_path__: "string", // eslint-disable-line camelcase
23+
__webpack_require__: "function", // eslint-disable-line camelcase
24+
__webpack_modules__: "object", // eslint-disable-line camelcase
25+
__webpack_chunk_load__: "function" // eslint-disable-line camelcase
2626
};
2727
var IGNORES = [
2828
];
2929
APIPlugin.prototype.apply = function(compiler) {
30-
compiler.plugin("compilation", function(compilation, params) {
30+
compiler.plugin("compilation", function(compilation) {
3131
compilation.dependencyFactories.set(ConstDependency, new NullFactory());
3232
compilation.dependencyTemplates.set(ConstDependency, new ConstDependency.Template());
3333
});
3434
Object.keys(REPLACEMENTS).forEach(function(key) {
35-
compiler.parser.plugin("expression "+key, function(expr) {
35+
compiler.parser.plugin("expression " + key, function(expr) {
3636
var dep = new ConstDependency(REPLACEMENTS[key], expr.range);
3737
dep.loc = expr.loc;
3838
this.state.current.addDependency(dep);
3939
return true;
4040
});
41-
compiler.parser.plugin("evaluate typeof "+key, function(expr) {
41+
compiler.parser.plugin("evaluate typeof " + key, function(expr) {
4242
return new BasicEvaluatedExpression().setString(REPLACEMENT_TYPES[key]).setRange(expr.range);
4343
});
4444
});
4545
IGNORES.forEach(function(key) {
46-
compiler.parser.plugin(key, function(expr) {
46+
compiler.parser.plugin(key, function() {
4747
return true;
4848
});
4949
});

lib/AbstractPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
*/
55
function AbstractPlugin(plugins) {
66
this._plugins = plugins || {};
7-
};
7+
}
88
module.exports = AbstractPlugin;
99

1010
AbstractPlugin.create = function(plugins) {
1111
function Plugin() {
12-
AbstractPlugin.call(this, plugins)
12+
AbstractPlugin.call(this, plugins);
1313
}
1414
Plugin.prototype = Object.create(AbstractPlugin.prototype);
1515
return Plugin;

lib/ArrayMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ArrayMap.prototype.set = function(key, value) {
2929
return this;
3030
};
3131

32-
ArrayMap.prototype.remove = function(key, value) {
32+
ArrayMap.prototype.remove = function(key) {
3333
for(var i = 0; i < this.keys.length; i++) {
3434
if(this.keys[i] === key) {
3535
this.keys.splice(i, 1);

0 commit comments

Comments
 (0)