Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

Commit

Permalink
Colors to chalk (#512)
Browse files Browse the repository at this point in the history
* Minor readme updates (#501)

* Update Webpack version

* Update Webpack version

* Fix acronym

* Fix markdown formatting.

* Update that redux branch does not have Flow

* Add 'Who is using it' section in the README

As per @ctrlplusb’s comment here:
#437 (comment)
98854669

* Server logging enhancements (#508)

* Improving logging experience + consolidating to single log function

* Adding pretty-error for more readable node error stack

* Fix eslint error

* Logging requests received

* Re-commit logging requests received

* Replacing colors with chalk
  • Loading branch information
oyeanuj authored and ctrlplusb committed Oct 16, 2017
1 parent f75a469 commit 75b1705
Show file tree
Hide file tree
Showing 4 changed files with 6,840 additions and 10 deletions.
17 changes: 13 additions & 4 deletions internal/development/createVendorDLL.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ function createVendorDLL(bundleName, bundleConfig) {
log({
title: 'vendorDLL',
level: 'info',
message: `Vendor DLL build complete. The following dependencies have been included:\n\t-${devDLLDependencies.join('\n\t-')}\n`,
message: `Vendor DLL build complete. The following dependencies have been included:\n\t-${devDLLDependencies.join(
'\n\t-',
)}\n`,
});

const webpackConfig = webpackConfigFactory();
Expand All @@ -83,9 +85,14 @@ function createVendorDLL(bundleName, bundleConfig) {
title: 'vendorDLL',
level: 'warn',
message: `Generating a new "${bundleName}" Vendor DLL for boosted development performance.
The Vendor DLL helps to speed up your development workflow by reducing Webpack build times. It does this by seperating Vendor DLLs from your primary bundles, thereby allowing Webpack to ignore them when having to rebuild your code for changes. We recommend that you add all your client bundle specific dependencies to the Vendor DLL configuration (within /config).`,
The Vendor DLL helps to speed up your development workflow by reducing Webpack build times. It does this by seperating Vendor DLLs from your primary bundles, thereby allowing Webpack to ignore them when having to rebuild your code for changes.
We recommend that you add all your client bundle specific dependencies to the Vendor DLL configuration (within /config).`,
});
buildVendorDLL().then(resolve).catch(reject);
buildVendorDLL()
.then(resolve)
.catch(reject);
} else {
// first check if the md5 hashes match
const dependenciesHash = fs.readFileSync(vendorDLLHashFilePath, 'utf8');
Expand All @@ -97,7 +104,9 @@ The Vendor DLL helps to speed up your development workflow by reducing Webpack b
level: 'warn',
message: `New "${bundleName}" vendor dependencies detected. Regenerating the vendor dll...`,
});
buildVendorDLL().then(resolve).catch(reject);
buildVendorDLL()
.then(resolve)
.catch(reject);
} else {
log({
title: 'vendorDLL',
Expand Down
10 changes: 5 additions & 5 deletions internal/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os from 'os';
import HappyPack from 'happypack';
import notifier from 'node-notifier';
import colors from 'colors/safe';
import chalk from 'chalk';
import { execSync } from 'child_process';
import appRootDir from 'app-root-dir';

Expand Down Expand Up @@ -35,17 +35,17 @@ export function log(options) {

switch (level) {
case 'warn':
console.log(colors.yellow(msg));
console.log(chalk.yellowBright(msg));
break;
case 'error':
console.log(colors.bgRed.white(msg));
console.log(chalk.bgRed.white.bold(msg));
break;
case 'special':
console.log(colors.italic.cyan(msg));
console.log(chalk.italic.cyanBright(msg));
break;
case 'info':
default:
console.log(colors.green.dim(msg));
console.log(chalk.gray(msg));
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"homepage": "https://github.com/ctrlplusb/react-universally#readme",
"dependencies": {
"app-root-dir": "1.0.2",
"colors": "1.1.2",
"compression": "1.7.1",
"cross-env": "5.0.5",
"dotenv": "4.0.0",
Expand Down Expand Up @@ -96,6 +95,7 @@
"babel-preset-react": "6.24.1",
"babel-preset-stage-3": "6.24.1",
"babel-template": "6.26.0",
"chalk": "2.1.0",
"chokidar": "1.7.0",
"css-loader": "0.28.7",
"enzyme": "3.1.0",
Expand Down
Loading

0 comments on commit 75b1705

Please sign in to comment.