Implementing analyze script (#1197)

This commit is contained in:
Ryan Randall
2018-03-09 11:13:02 -05:00
committed by Kevin Barabash
parent 20b5a58451
commit 017eb7b91d
3 changed files with 549 additions and 63 deletions

597
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -52,6 +52,7 @@
"stylelint-config-standard": "^18.0.0",
"uglifyjs-webpack-plugin": "^1.1.6",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.11.1",
"webpack-dev-server": "^2.7.1"
},
"bin": "cli.js",
@@ -69,6 +70,7 @@
"clean-install": "npm run clean && npm i",
"prestart": "node check-node-version.js && check-dependencies && cd src && node unicodeMake.js >unicodeSymbols.js",
"start": "webpack-dev-server --hot --config webpack.dev.js",
"analyze": "webpack --config webpack.analyze.js",
"build": "npm run prestart && rimraf build/* && webpack",
"watch": "npm run build -- --watch",
"dist": "npm test && npm run build && npm run dist:copy && npm run dist:zip && npm run dist:dist",

13
webpack.analyze.js Normal file
View File

@@ -0,0 +1,13 @@
// @flow
const { targets, createConfig } = require('./webpack.common');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
// dev minify
const katexConfig = createConfig(targets.shift(), false, false);
katexConfig.plugins.push(new BundleAnalyzerPlugin());
module.exports = [
katexConfig,
];