Skip to content

Commit 7934faa

Browse files
committed
Merge branch 'master' into webpack-2
Conflicts: .travis.yml bin/config-optimist.js package.json test/TestCases.test.js
2 parents 44f919e + c0afdf9 commit 7934faa

25 files changed

Lines changed: 355 additions & 306 deletions

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- "0.12"
5-
- "iojs"
4+
- node
5+
- iojs-1
6+
- iojs-2
7+
- iojs
68
script: npm run travis
79
env:
810
- NO_WATCH_TESTS=1

CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ that include your webpack.config.js and relevant files are more likely to receiv
1212
If you have created your own loader/plugin please include it on the relevant
1313
documentation pages:
1414

15-
[List of loaders](http://webpack.github.io/docs/list-of-loaders.html)
16-
[List of plugins](http://webpack.github.io/docs/list-of-plugins.html)
15+
[List of loaders](https://webpack.github.io/docs/list-of-loaders.html)
16+
[List of plugins](https://webpack.github.io/docs/list-of-plugins.html)
1717

1818
### Documentation
1919

2020
webpack is insanely feature rich and documentation is a huge time sink. We
2121
greatly appreciate any time spent fixing typos or clarifying sections in the
22-
documentation.
22+
documentation.
2323

2424

2525
## Submitting Changes
@@ -38,4 +38,3 @@ Some things that will increase the chance that your pull request is accepted:
3838
* Write tests
3939
* Follow the existing coding style
4040
* Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
41-

README.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
[![webpack](http://webpack.github.io/assets/logo.png)](http://webpack.github.io)
1+
[![webpack](https://webpack.github.io/assets/logo.png)](https://webpack.github.io)
22

3-
4-
[![NPM version][npm-image]][npm-url] [![Gitter chat][gitter-image]][gitter-url] [![Downloads][downloads-image]][downloads-url]
3+
4+
[![NPM version][npm-image]][npm-url] [![Gitter chat][gitter-image]][gitter-url] [![Downloads][downloads-image]][downloads-url]
55
[![NPM][nodei-image]][nodei-url]
66

7-
build
8-
[![Build Status][travis-image]][travis-url] [![Appveyor Status][appveyor-image]][appveyor-url] [![Coverage Status][coveralls-image]][coveralls-url]
7+
build
8+
[![Build Status][travis-image]][travis-url] [![Appveyor Status][appveyor-image]][appveyor-url] [![Coverage Status][coveralls-image]][coveralls-url]
99

10-
dependencies
10+
dependencies
1111
[![Dependency Status][david-image]][david-url] [![devDependency Status][david-dev-image]][david-dev-url] [![peerDependency Status][david-peer-image]][david-peer-url]
1212

13-
donation
13+
donation
1414
[![Gittip donate button][gittip-image]][gittip-url] [![Donate to sokra][donate-image]][donate-url]
1515

1616

17-
18-
19-
20-
21-
[documentation](http://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=top)
17+
[documentation](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=top)
2218

2319
# Introduction
2420

@@ -37,7 +33,7 @@ or packaging just about any resource or asset.
3733

3834
# Getting Started
3935

40-
Check out webpack's [documentation](http://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=trdr) for quick Getting Started guide, in-depth usage,
36+
Check out webpack's [documentation](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=trdr) for quick Getting Started guide, in-depth usage,
4137
tutorials and resources.
4238

4339
# Installation
@@ -48,7 +44,7 @@ project:
4844
global:
4945
`npm install webpack -g`
5046
Usage
51-
http://webpack.github.io/docs/tutorials/getting-started/
47+
https://webpack.github.io/docs/tutorials/getting-started/
5248

5349
# Examples
5450

@@ -59,7 +55,7 @@ Take a look at the [`examples`](https://github.com/webpack/webpack/tree/master/e
5955
## Plugins
6056

6157
webpack has a [rich plugin
62-
interface](http://webpack.github.io/docs/plugins.html). Most of the features
58+
interface](https://webpack.github.io/docs/plugins.html). Most of the features
6359
within webpack itself use this plugin interface. This makes webpack very
6460
**flexible**.
6561

@@ -73,12 +69,12 @@ and incredibly **fast** on incremental compilations.
7369

7470
webpack enables use of loaders to preprocess files. This allows you to bundle
7571
**any static resource** way beyond JavaScript. You can easily [write your own
76-
loaders](http://webpack.github.io/docs/loaders.html) using node.js.
72+
loaders](https://webpack.github.io/docs/loaders.html) using node.js.
7773

7874
Loaders are activated by using `loadername!` prefixes in `require()` statements,
7975
or are automatically applied via regex from your webpack configuration.
8076

81-
Please see [Using Loaders](http://webpack.github.io/docs/using-loaders.html) for more information.
77+
Please see [Using Loaders](https://webpack.github.io/docs/using-loaders.html) for more information.
8278

8379
**basic**
8480
* [`json`](https://github.com/webpack/json-loader): Loads file as JSON
@@ -98,7 +94,7 @@ Please see [Using Loaders](http://webpack.github.io/docs/using-loaders.html) for
9894
* [`coffee`](https://github.com/webpack/coffee-loader): Loads coffee-script like JavaScript
9995
* [`babel`](https://github.com/babel/babel-loader): Turn ES6 code into vanilla ES5 using [Babel](https://github.com/babel/babel).
10096
* [`livescript`](https://github.com/appedemic/livescript-loader): Loads LiveScript like JavaScript
101-
* [`sweetjs`](https://github.com/jlongster/sweetjs-loader): Use sweetjs macros.
97+
* [`sweetjs`](https://github.com/jlongster/sweetjs-loader): Use sweetjs macros.
10298
* [`traceur`](https://github.com/jupl/traceur-loader): Use future JavaScript features with [Traceur](https://github.com/google/traceur-compiler).
10399
* [`typescript`](https://github.com/andreypopp/typescript-loader): Loads TypeScript like JavaScript.
104100

@@ -127,7 +123,7 @@ Please see [Using Loaders](http://webpack.github.io/docs/using-loaders.html) for
127123
* [`injectable`](https://github.com/jauco/webpack-injectable): Allow to inject dependencies into modules
128124
* [`transform`](https://github.com/webpack/transform-loader): Use browserify transforms as loader.
129125

130-
For the full list of loaders, see [list of loaders](http://webpack.github.io/docs/list-of-loaders.html).
126+
For the full list of loaders, see [list of loaders](https://webpack.github.io/docs/list-of-loaders.html).
131127

132128
## Module Format (AMD/CommonJS)
133129

@@ -140,17 +136,17 @@ simple expressions. This allows you to **support most existing libraries** out o
140136
webpack allows you to split your codebase into multiple chunks. Chunks are
141137
loaded asynchronously at runtime. This reduces the initial loading time.
142138

143-
[Code Splitting documentation](http://webpack.github.io/docs/code-splitting.html)
139+
[Code Splitting documentation](https://webpack.github.io/docs/code-splitting.html)
144140

145141
## Optimizations
146142

147143
webpack can do many optimizations to **reduce the output size of your
148144
JavaScript** by deduplicating frequently used modules, minifying, and giving
149145
you full control of what is loaded initially and what is loaded at runtime
150146
through code splitting. It can also can make your code chunks **cache
151-
friendly** by using hashes.
147+
friendly** by using hashes.
152148

153-
[Optimization documentation](http://webpack.github.io/docs/optimization.html)
149+
[Optimization documentation](https://webpack.github.io/docs/optimization.html)
154150

155151
webpack optimizes in several ways. It also makes your chunks **cache-friendly** by using hashes.
156152

@@ -160,7 +156,7 @@ webpack optimizes in several ways. It also makes your chunks **cache-friendly**
160156
// webpack is a module bundler.
161157
// This means webpack takes modules with dependencies
162158
// and emits static assets representing those modules.
163-
159+
164160
// Dependencies can be written in CommonJs
165161
var commonjs = require("./commonjs");
166162
// or in AMD
@@ -178,8 +174,8 @@ define(["amd-module", "../file"], function (amdModule, file) {
178174
// of the AMD require.
179175
});
180176
});
181-
182-
177+
178+
183179
require("coffee!./cup.coffee");
184180
// "Loaders" are used to preprocess files.
185181
// They can be prefixed in the require call
@@ -200,7 +196,7 @@ function loadTemplate (name) {
200196

201197
// ...and you can combine everything.
202198
function loadTemplateAsync (name, callback) {
203-
require(["bundle?lazy!./templates/" + name + ".jade"],
199+
require(["bundle?lazy!./templates/" + name + ".jade"],
204200
function (templateBundle) {
205201
templateBundle(callback);
206202
});
@@ -209,12 +205,12 @@ function loadTemplateAsync (name, callback) {
209205

210206
## Documentation
211207

212-
[documentation](http://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=documentation)
208+
[documentation](https://webpack.github.io/docs/?utm_source=github&utm_medium=readme&utm_campaign=documentation)
213209

214210

215211
## Changelog
216212

217-
[changelog](http://webpack.github.io/docs/changelog.html)
213+
[changelog](https://webpack.github.io/docs/changelog.html)
218214

219215

220216
## Tests

bin/config-optimist.js

Lines changed: 45 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,47 @@
11
module.exports = function(optimist) {
22
optimist
3-
4-
.boolean("help").alias("help", "h").alias("help", "?").describe("help")
5-
6-
.string("config").describe("config")
7-
8-
.string("env").describe("env", "Enviroment passed to the config, when it is a function")
9-
10-
.string("context").describe("context")
11-
12-
.string("entry").describe("entry")
13-
14-
.string("module-bind").describe("module-bind")
15-
16-
.string("module-bind-post").describe("module-bind-post")
17-
18-
.string("module-bind-pre").describe("module-bind-pre")
19-
20-
.string("output-path").describe("output-path")
21-
22-
.string("output-file").describe("output-file")
23-
24-
.string("output-chunk-file").describe("output-chunk-file")
25-
26-
.string("output-source-map-file").describe("output-source-map-file")
27-
28-
.string("output-public-path").describe("output-public-path")
29-
30-
.string("output-jsonp-function").describe("output-jsonp-function")
31-
32-
.boolean("output-pathinfo").describe("output-pathinfo")
33-
34-
.string("output-library").describe("output-library")
35-
36-
.string("output-library-target").describe("output-library-target")
37-
38-
.string("records-input-path").describe("records-input-path")
39-
40-
.string("records-output-path").describe("records-output-path")
41-
42-
.string("records-path").describe("records-path")
43-
44-
.string("define").describe("define")
45-
46-
.string("target").describe("target")
47-
48-
.boolean("cache").describe("cache").default("cache", true)
49-
50-
.boolean("watch").alias("watch", "w").describe("watch")
51-
52-
.describe("watch-aggregate-timeout")
53-
54-
.describe("watch-poll")
55-
56-
.boolean("hot").alias("hot", "h").describe("hot")
57-
58-
.boolean("debug").describe("debug")
59-
60-
.string("devtool").describe("devtool")
61-
62-
.boolean("progress").describe("progress")
63-
64-
.string("resolve-alias").describe("resolve-alias")
65-
66-
.string("resolve-loader-alias").describe("resolve-loader-alias")
67-
68-
.describe("optimize-max-chunks")
69-
70-
.describe("optimize-min-chunk-size")
71-
72-
.boolean("optimize-minimize").describe("optimize-minimize")
73-
74-
.boolean("optimize-dedupe").describe("optimize-dedupe")
75-
76-
.string("prefetch").describe("prefetch")
77-
78-
.string("provide").describe("provide")
79-
80-
.boolean("labeled-modules").describe("labeled-modules")
81-
82-
.string("plugin").describe("plugin")
83-
84-
.boolean("bail").describe("bail")
85-
86-
.boolean("profile").describe("profile")
87-
88-
.boolean("d").describe("d", "shortcut for --debug --devtool sourcemap --output-pathinfo")
89-
90-
.boolean("p").describe("p", "shortcut for --optimize-minimize");
91-
};
3+
.boolean("help").alias("help", "h").alias("help", "?").describe("help")
4+
.string("config").describe("config")
5+
.string("env").describe("env", "Enviroment passed to the config, when it is a function")
6+
.string("context").describe("context")
7+
.string("entry").describe("entry")
8+
.string("module-bind").describe("module-bind")
9+
.string("module-bind-post").describe("module-bind-post")
10+
.string("module-bind-pre").describe("module-bind-pre")
11+
.string("output-path").describe("output-path")
12+
.string("output-file").describe("output-file")
13+
.string("output-chunk-file").describe("output-chunk-file")
14+
.string("output-source-map-file").describe("output-source-map-file")
15+
.string("output-public-path").describe("output-public-path")
16+
.string("output-jsonp-function").describe("output-jsonp-function")
17+
.boolean("output-pathinfo").describe("output-pathinfo")
18+
.string("output-library").describe("output-library")
19+
.string("output-library-target").describe("output-library-target")
20+
.string("records-input-path").describe("records-input-path")
21+
.string("records-output-path").describe("records-output-path")
22+
.string("records-path").describe("records-path")
23+
.string("define").describe("define")
24+
.string("target").describe("target")
25+
.boolean("cache").describe("cache").default("cache", true)
26+
.boolean("watch").alias("watch", "w").describe("watch")
27+
.describe("watch-aggregate-timeout")
28+
.describe("watch-poll")
29+
.boolean("hot").alias("hot", "h").describe("hot")
30+
.boolean("debug").describe("debug")
31+
.string("devtool").describe("devtool")
32+
.boolean("progress").describe("progress")
33+
.string("resolve-alias").describe("resolve-alias")
34+
.string("resolve-loader-alias").describe("resolve-loader-alias")
35+
.describe("optimize-max-chunks")
36+
.describe("optimize-min-chunk-size")
37+
.boolean("optimize-minimize").describe("optimize-minimize")
38+
.boolean("optimize-dedupe").describe("optimize-dedupe")
39+
.string("prefetch").describe("prefetch")
40+
.string("provide").describe("provide")
41+
.boolean("labeled-modules").describe("labeled-modules")
42+
.string("plugin").describe("plugin")
43+
.boolean("bail").describe("bail")
44+
.boolean("profile").describe("profile")
45+
.boolean("d").describe("d", "shortcut for --debug --devtool sourcemap --output-pathinfo")
46+
.boolean("p").describe("p", "shortcut for --optimize-minimize");
47+
};

0 commit comments

Comments
 (0)