Skip to content

feat: docs optimizations #1860

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

Merged
merged 2 commits into from
Aug 22, 2019
Merged
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
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ cache:
script:
- yarn lint
- yarn test
- yarn build
after_success:
- yarn run codecov
before_deploy:
- yarn run build:docs
deploy:
provider: pages
skip_cleanup: true
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"sass-loader": "^7.3.1",
"sinon": "^7.4.1",
"style-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.7",
"webpack-dev-middleware": "^3.7.0",
Expand Down
14 changes: 7 additions & 7 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
var express = require("express");
var webpack = require("webpack");
var merge = require("lodash/merge");
var config = merge({}, require("./webpack.docs.config"));
const express = require("express");
const webpack = require("webpack");
const merge = require("lodash/merge");
const config = require("./webpack.docs.config");

config.devtool = "cheap-module-eval-source-map";
config.entry.unshift("webpack-hot-middleware/client");
config.plugins.push(
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
new webpack.NoEmitOnErrorsPlugin()
);

var app = express();
var compiler = webpack(config);
const app = express();
const compiler = webpack(config);

app.use(
require("webpack-dev-middleware")(compiler, {
Expand Down
6 changes: 5 additions & 1 deletion webpack.docs.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require("path");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");

module.exports = {
mode: "production",
Expand Down Expand Up @@ -56,5 +57,8 @@ module.exports = {
new MiniCssExtractPlugin({
filename: "style.css"
})
]
],
optimization: {
minimizer: [new UglifyJsPlugin()]
}
};
17 changes: 16 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9150,14 +9150,29 @@ ua-parser-js@^0.7.18:
version "0.7.18"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed"

uglify-js@^3.1.4, uglify-js@^3.4.9:
uglify-js@^3.1.4, uglify-js@^3.4.9, uglify-js@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
dependencies:
commander "~2.20.0"
source-map "~0.6.1"

uglifyjs-webpack-plugin@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.2.0.tgz#e75bc80e7f1937f725954c9b4c5a1e967ea9d0d7"
integrity sha512-mHSkufBmBuJ+KHQhv5H0MXijtsoA1lynJt1lXOaotja8/I0pR4L9oGaPIZw+bQBOFittXZg9OC1sXSGO9D9ZYg==
dependencies:
cacache "^12.0.2"
find-cache-dir "^2.1.0"
is-wsl "^1.1.0"
schema-utils "^1.0.0"
serialize-javascript "^1.7.0"
source-map "^0.6.1"
uglify-js "^3.6.0"
webpack-sources "^1.4.0"
worker-farm "^1.7.0"

ultron@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
Expand Down