Sitelet https://github.com/sorrycc/roadhog/commit/6c612ff4bf70913aff8591e2ef1e6436266c0d0f
Skip to content

Commit 6c612ff

Browse files
authored
Merge pull request #837 from sorrycc/bigbrotherDev
Bigbrother dev
2 parents 1d7ab6b + f49475f commit 6c612ff

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "roadhog",
3-
"version": "2.4.5",
3+
"version": "2.4.6",
44
"description": "Cli tool for creating react apps, configurable version of create-react-app.",
55
"bin": {
66
"roadhog": "./bin/roadhog.js"

‎src/dev.js‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { resolve } from 'path';
1+
import { resolve, join } from 'path';
22
import dev from 'af-webpack/dev';
33
import chalk from 'chalk';
4+
import BuildStatistics from 'build-statistics-webpack-plugin';
5+
import BigBrother from 'bigbrother-webpack-plugin';
46
import getConfig, {
57
watchConfigs,
68
unwatchConfigs,
@@ -54,6 +56,25 @@ export default function runDev(opts = {}) {
5456
entry,
5557
});
5658

59+
const stagesPath = join(
60+
__dirname,
61+
'../.run/build-statistics/compilation.json',
62+
);
63+
const roadhogPkg = require(join(__dirname, '../package.json'));
64+
webpackConfig.plugins.push(
65+
new BuildStatistics({
66+
path: stagesPath,
67+
}),
68+
new BigBrother({
69+
cwd,
70+
tool: {
71+
name: 'roadhog',
72+
version: roadhogPkg.version,
73+
stagesPath,
74+
},
75+
}),
76+
);
77+
5778
dev({
5879
webpackConfig,
5980
proxy: config.proxy || {},

0 commit comments

Comments
 (0)