Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
cabd893
Fix internal fragmtn links in optimization.md
Munter Jul 27, 2018
5321534
Skip link checking or opencollective.com/webpack. Massive html respon…
Munter Jul 27, 2018
03e0dcf
Try out travis staged build
Munter Jul 27, 2018
b31f42e
Add proselint
Munter Jul 27, 2018
e616a32
Upgrade pip before using it
Munter Jul 28, 2018
64d5ac9
Move before-hooks around to try and make proselint install
Munter Jul 28, 2018
012b534
Try adding python as a language as well to geet an updated version
Munter Jul 28, 2018
3efa21d
More messing with config
Munter Jul 28, 2018
2bcfb86
Manually handle node versioning
Munter Jul 28, 2018
10f18df
Add node minor version to nvm install. Defaulted to slightly too low …
Munter Jul 28, 2018
ba535b5
Manually install node 8.11
Munter Jul 28, 2018
315cdef
Try a matrix build to separate node and python stuff
Munter Jul 28, 2018
ef4cafa
Add linkcheck task and try a different cahce setup
Munter Jul 28, 2018
1bfbcc8
Minor name change to test if cache works correctly across builds
Munter Jul 28, 2018
f8a6cf8
Attempt to combine matrix and staged build
Munter Jul 28, 2018
df21ca2
Attempt going back to staged build
Munter Jul 28, 2018
b344006
Bump travis
Munter Jul 28, 2018
625c6e7
Ping Travis. You alive?
Munter Jul 28, 2018
3416ecb
Fix broken travis.yml
Munter Jul 28, 2018
3545917
Fix wrong stage order
Munter Jul 28, 2018
5d238f4
Explicitly run specific lintings, exclude proselint
Munter Jul 28, 2018
2dc8216
Allow failures for link checker
Munter Jul 28, 2018
d0c36fc
Change proselint cache directory. Maybe this works
Munter Jul 28, 2018
0c18717
Add new script to fetch repository names that the docs should contain…
Munter Jul 28, 2018
b88f90b
Add caching to eslint
Munter Jul 28, 2018
08dbaef
Remove parts of deploy.sh that are now run by travis
Munter Jul 28, 2018
9f1a1cc
Added new ./repositories to store github api results
Munter Jul 28, 2018
7b9d413
Replace fetch.sh with npm scripts and fetch-package-readmes.js
Munter Jul 28, 2018
b2b63b6
Attempt to make caches more specific to the containers and stages the…
Munter Jul 28, 2018
906455d
Remove deprecaed fetch_packages script. Now replaced by two-step fetc…
Munter Jul 28, 2018
03c68df
Attempt a more windows friendly build by using npm and webpack instea…
Munter Jul 28, 2018
7d4bb06
Disable link checking for now to speed up builds
Munter Jul 28, 2018
b6b2476
Revert "Disable link checking for now to speed up builds"
Munter Jul 28, 2018
fc7676d
Add dist to proselint cache so generated content also gets checked
Munter Jul 28, 2018
993c998
Remove unnessessary GITHUB_TOKEN env variable check in repo fetching …
Munter Jul 28, 2018
8332fe3
Revert "Add dist to proselint cache so generated content also gets ch…
Munter Jul 28, 2018
fbd7a2f
Rework pipeline for better speed and make proselint a deployment blocker
Munter Jul 29, 2018
65644a1
Rename build stage to reflect its actions
Munter Jul 29, 2018
a2e6146
Run content-tree only after generating all external content
Munter Jul 29, 2018
1ec6c28
Remove link to non-existing named-modules-plugin
Munter Jul 29, 2018
80685a7
Fix double slashes in edit links
Munter Jul 29, 2018
42f0b1d
Rename stages
Munter Jul 29, 2018
dc053d9
Add new internal link check as a blocking check
Munter Jul 29, 2018
ea7f606
Fix wrong name in allowed_failures config
Munter Jul 29, 2018
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
62 changes: 50 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,53 @@
branches:
only:
- master
- develop
sudo: false
language: node_js
node_js:
- "8"
sudo: required
install:
- yarn
- sudo pip install proselint
before_script:
- source ./src/scripts/env.sh
script:
- bash ./src/scripts/deploy.sh

cache:
yarn: true
pip: true
directories:
- ./node_modules
- ./dist
- $HOME/.cache

stages:
- lint
- build
- post-build

jobs:
fast_finish: true
allow_failures:
- name: Link check

include:
- stage: lint
name: Linting
before_install: npm install --global yarn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis will automatically use yarn once it sees yarn.lock file, we don't need to install it explicitly.

install: yarn
script:
- yarn lint:js
- yarn lint:markdown
- yarn lint:social

- stage: build
name: Build
before_script: source ./src/scripts/env.sh
script: yarn build

- stage: post-build
name: Deploy
if: branch = master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition saves deploy.sh internal condition, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll clean that up in a bit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

script: bash ./src/scripts/deploy.sh

- stage: post-build
name: Link check
script: yarn linkcheck

- stage: post-build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it this one post build? We shouldn't build if this command fails.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can re-order as we see fit later. Right now I just need to get the pieces working, then we can discuss what the pipeline should do.

name: Proselint
language: python
python: 3.6
install: pip install -r requirements.txt
script: cp .proselintrc ~/ && proselint src/content
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"lint:markdown": "markdownlint --config ./.markdownlint.json *.md ./src/content/**/*.md --ignore './src/content/**/_*.md'",
"lint:social": "alex . -q",
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
"linkcheck": "hyperlink -r dist/index.html --canonicalroot https://webpack.js.org/ --skip support__ --skip sidecar.gitter.im --skip vimdoc.sourceforge.net --skip img.shields.io --skip npmjs.com/package/ --todo external-redirect | tee master.tap | tap-spot",
"linkcheck": "hyperlink -r dist/index.html --canonicalroot https://webpack.js.org/ --skip support__ --skip sidecar.gitter.im --skip vimdoc.sourceforge.net --skip img.shields.io --skip npmjs.com/package/ --skip opencollective.com/webpack --todo external-redirect | tee master.tap | tap-spot",
"sitemap": "cd dist && sitemap-static --prefix=https://webpack.js.org/ > sitemap.xml",
"serve": "npm run build && sirv start ./dist --port 4000",
"deploy": "gh-pages -d dist"
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
proselint
6 changes: 3 additions & 3 deletions src/content/configuration/optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ module.exports = {

`bool`

Tells webpack to determine used exports for each module. This depends on [`optimization.providedExports`](#optimization-occurrenceorder). Information collected by `optimization.usedExports` is used by other optimizations or code generation i.e. exports are not generated for unused exports, export names are mangled to single char identifiers when all usages are compatible.
Tells webpack to determine used exports for each module. This depends on [`optimization.providedExports`](#optimizationoccurrenceorder). Information collected by `optimization.usedExports` is used by other optimizations or code generation i.e. exports are not generated for unused exports, export names are mangled to single char identifiers when all usages are compatible.
Dead code elimination in minimizers will benefit from this and can remove unused exports.
By default `optimization.usedExports` is enabled in `production` [mode](/concepts/mode/) and disabled elsewise.

Expand All @@ -312,8 +312,8 @@ module.exports = {

`bool`

Tells webpack to find segments of the module graph which can be safely concatenated into a single module. Depends on [`optimization.providedExports`](#optimization-providedexports) and [`optimization.usedExports`](#optimization-usedexports).
By default `optimization.concatenateModules` is enabled in `production` [mode](/concepts/mode/) and disabled elsewise.
Tells webpack to find segments of the module graph which can be safely concatenated into a single module. Depends on [`optimization.providedExports`](#optimizationprovidedexports) and [`optimization.usedExports`](#optimizationusedexports).
By default `optimization.concatenateModules` is enabled in `production` [mode](/concepts/mode/) and disabled elsewise.

__webpack.config.js__

Expand Down