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

Fix Hyperlink/Travis Issues #1582

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ branches:
- develop
language: node_js
node_js:
- "6"
- "8"
script:
- bash ./src/scripts/deploy.sh
sudo: required
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"fetch": "sh src/scripts/fetch.sh",
"init:generated": "mkdirp ./generated/loaders && mkdirp ./generated/plugins ",
"lint": "run-s lint:*",
"lint:links": "hyperlink -r build/index.html --canonicalroot https://webpack.js.org/ --skip support__ --skip sidecar.gitter.im --todo img.shields.io --todo external-redirect | tee master.tap | tap-spot",
"lint:js": "eslint . --ext .js --ext .jsx",
"lint:markdown": "markdownlint --config ./.markdownlint.json *.md ./src/content/**/*.md",
"lint:social": "alex . -q",
Expand Down Expand Up @@ -66,7 +67,7 @@
"github": "^10.0.0",
"html-webpack-plugin": "^3.1.0",
"http-server": "^0.10.0",
"hyperlink": "^3.0.1",
"hyperlink": "github:Munter/hyperlink#070916d",
"loader-utils": "^1.1.0",
"lodash": "^4.17.4",
"markdown-loader": "^2.0.1",
Expand All @@ -89,7 +90,7 @@
"sass-loader": "^6.0.6",
"sitemap-static": "^0.4.2",
"tap-min": "^1.2.1",
"tap-parser": "^6.0.1",
"tap-spot": "^1.1.1",
"through2": "^2.0.3",
"url-loader": "^0.5.9",
"webpack": "^4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/content/configuration/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ The prefix length of the hash digest to use, defaults to `20`.

`string|function`

The hashing algorithm to use, defaults to `'md5'`. All functions from Node.JS' [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) are supported. Since `4.0.0-alpha2`, the `hashFunction` can now be a constructor to a custom hash function. You can provide a non-crypto hash function for performance reasons.
The hashing algorithm to use, defaults to `'md5'`. All functions from Node.JS' [`crypto.createHash`](https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options) are supported. Since `4.0.0-alpha2`, the `hashFunction` can now be a constructor to a custom hash function. You can provide a non-crypto hash function for performance reasons.

``` js
hashFunction: require('metrohash').MetroHash64
Expand All @@ -260,7 +260,7 @@ Make sure that the hashing function will have `update` and `digest` methods avai

## `output.hashSalt`

An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.org/api/crypto.html#crypto_hash_update_data_input_encoding).
An optional salt to update the hash via Node.JS' [`hash.update`](https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding).


## `output.hotUpdateChunkFilename`
Expand Down
50 changes: 0 additions & 50 deletions src/scripts/check-links.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/scripts/fetch_package_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function fetchPackageFiles(options, finalCb) {
// Examples:
// - [click here](LICENSE) --> [click here](https://raw.github.com/user/repository/branch/LICENSE)
// - [click here](./LICENSE) --> [click here](https://raw.github.com/user/repository/branch/LICENSE)
// - [click here](#LICENSE) --> [click here](https://raw.github.com/user/repository/branch#LICENSE)
.replace(/\[([^[\]]*)\]\(([^)]+)\)/g, (match, textContent, href) => `[${textContent}](${urlModule.resolve(url, href)})`)
// - [click here](#LICENSE) --> [click here](#LICENSE)
.replace(/\[([^[\]]*)\]\(([^)#]+)\)/g, (match, textContent, href) => `[${textContent}](${urlModule.resolve(url, href)})`)
// Modify links to keep them within the site
.replace(/https?:\/\/github.com\/(webpack|webpack-contrib)\/([-A-za-z0-9]+-loader\/?)([)"])/g, '/loaders/$2/$3')
.replace(/https?:\/\/github.com\/(webpack|webpack-contrib)\/([-A-za-z0-9]+-plugin\/?)([)"])/g, '/plugins/$2/$3')
Expand Down