Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct a path error in example #1899

Merged
merged 8 commits into from
Mar 17, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16,295 changes: 16,295 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/content/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Parameter | Explanation | Input type | D
`--debug` | Switch loaders to debug mode | boolean | false
`--devtool` | Define [source map type](/configuration/devtool/) for the bundled resources | string | -
`--progress` | Print compilation progress in percentage | boolean | false

`--display-error-details` | Display details about errors | boolean | false

### Module Options

Expand Down
2 changes: 1 addition & 1 deletion src/content/api/loaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ __sync-loader-with-multiple-results.js__

``` js
module.exports = function(content, map, meta) {
this.callback(null, someSyncOperation(content), sourceMaps, meta);
this.callback(null, someSyncOperation(content), map, meta);
return; // always return undefined when calling callback()
};
```
Expand Down
4 changes: 3 additions & 1 deletion src/content/guides/asset-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ contributors:
- michael-ciniawsky
- TheDutchCoder
- sudarsangp
- chenxsan
---

If you've been following the guides from the start, you will now have a small project that shows "Hello webpack". Now let's try to incorporate some other assets, like images, to see how they can be handled.
Expand All @@ -21,6 +22,7 @@ Let's make a minor change to our project before we get started:
__dist/index.html__

``` diff
<!doctype html>
<html>
<head>
- <title>Getting Started</title>
Expand Down Expand Up @@ -324,7 +326,7 @@ __project__
|- /node_modules
```

With the loader configured and fonts in place, you can use incorporate them via an `@font-face` declaration. The local `url(...)` directive will be picked up by webpack just as it was with the image:
With the loader configured and fonts in place, you can incorporate them via an `@font-face` declaration. The local `url(...)` directive will be picked up by webpack just as it was with the image:

__src/style.css__

Expand Down
21 changes: 11 additions & 10 deletions src/content/guides/author-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,18 @@ require(['webpackNumbers'], function ( webpackNumbers) {
The consumer also can use the library by loading it via a script tag:

``` html
<!doctype html>
<html>
...
<script src="https://unpkg.com/webpack-numbers"></script>
<script>
// ...
// Global variable
webpackNumbers.wordToNum('Five')
// Property in the window object
window.webpackNumbers.wordToNum('Five')
// ...
</script>
...
<script src="https://unpkg.com/webpack-numbers"></script>
<script>
// ...
// Global variable
webpackNumbers.wordToNum('Five')
// Property in the window object
window.webpackNumbers.wordToNum('Five')
// ...
</script>
</html>
```

Expand Down
2 changes: 1 addition & 1 deletion src/content/guides/development-vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
And create a `index.html` file. The script tag should point to your bundle. If `output.filename` is not specified in the config, this will be `bundle.js`.

```html
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<script src="/bundle.js" charset="utf-8"></script>
Expand Down
4 changes: 3 additions & 1 deletion src/content/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ document.body.appendChild(component());
__index.html__

``` html
<!doctype html>
<html>
<head>
<title>Getting Started</title>
Expand Down Expand Up @@ -127,14 +128,15 @@ Now, since we'll be bundling our scripts, we have to update our `index.html` fil
__dist/index.html__

``` diff
<!doctype html>
<html>
<head>
<title>Getting Started</title>
- <script src="https://unpkg.com/[email protected]"></script>
</head>
<body>
- <script src="./src/index.js"></script>
+ <script src="bundle.js"></script>
+ <script src="dist/bundle.js"></script>
</body>
</html>
```
Expand Down
1 change: 1 addition & 0 deletions src/content/guides/output-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Let's also update our `dist/index.html` file, in preparation for webpack to spli
__dist/index.html__

``` diff
<!doctype html>
<html>
<head>
- <title>Asset Management</title>
Expand Down
1 change: 1 addition & 0 deletions src/content/guides/shimming.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ With that in place, we can add the logic to conditionally load our new `polyfill
__dist/index.html__

``` diff
<!doctype html>
<html>
<head>
<title>Getting Started</title>
Expand Down
1 change: 1 addition & 0 deletions src/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = {
__page.html__

```html
<!doctype html>
<html>
<head>
...
Expand Down
3 changes: 2 additions & 1 deletion src/content/plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ contributors:
- rouzbeh84
- aretecode
- eko3alpha
- refactorized
---

webpack has a rich plugin interface. Most of the features within webpack itself use this plugin interface. This makes webpack **flexible**.
Expand All @@ -16,9 +17,9 @@ Name | Description
[`BabelMinifyWebpackPlugin`](/plugins/babel-minify-webpack-plugin) | Minification with [babel-minify](https://github.com/babel/minify)
[`BannerPlugin`](/plugins/banner-plugin) | Add a banner to the top of each generated chunk
[`CommonsChunkPlugin`](/plugins/commons-chunk-plugin) | Extract common modules shared between chunks
[`ComponentWebpackPlugin`](/plugins/component-webpack-plugin) | Use components with webpack
[`CompressionWebpackPlugin`](/plugins/compression-webpack-plugin) | Prepare compressed versions of assets to serve them with Content-Encoding
[`ContextReplacementPlugin`](/plugins/context-replacement-plugin) | Override the inferred context of a `require` expression
[`CopyWebpackPlugin`](/plugins/copy-webpack-plugin) | Copies individual files or entire directories to the build directory
[`DefinePlugin`](/plugins/define-plugin) | Allow global constants configured at compile time
[`DllPlugin`](/plugins/dll-plugin) | Split bundles in order to drastically improve build time
[`EnvironmentPlugin`](/plugins/environment-plugin) | Shorthand for using the [`DefinePlugin`](./define-plugin) on `process.env` keys
Expand Down
3 changes: 3 additions & 0 deletions src/scripts/fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ node ./src/scripts/fetch_package_names.js "peerigon" "extract-loader" | node ./s
# Fetch webpack-contrib (and various other) plugin repositories
node ./src/scripts/fetch_package_names.js "webpack-contrib" "-webpack-plugin" | node ./src/scripts/fetch_package_files.js "README.md" "./generated/plugins"

# Remove deprecated or archived plugins repositories
rm ./generated/plugins/component-webpack-plugin.json ./generated/plugins/component-webpack-plugin.md

# Fetch sponsors and backers from opencollective
node ./src/scripts/fetch_supporters.js

Expand Down