Skip to content

Commit

Permalink
Move chalk dependency to react-dev-utils (facebook#6150)
Browse files Browse the repository at this point in the history
Related to facebook#751
  • Loading branch information
evaporei authored and mrmckeb committed Jan 12, 2019
1 parent 8174eed commit 47e9e2c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 8 deletions.
12 changes: 12 additions & 0 deletions packages/react-dev-utils/chalk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

'use strict';

var chalk = require('chalk');

module.exports = chalk;
1 change: 1 addition & 0 deletions packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"files": [
"browsersHelper.js",
"chalk.js",
"checkRequiredFiles.js",
"clearConsole.js",
"crossSpawn.js",
Expand Down
1 change: 0 additions & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"babel-preset-react-app": "^7.0.0",
"bfj": "6.1.1",
"case-sensitive-paths-webpack-plugin": "2.1.2",
"chalk": "2.4.2",
"css-loader": "1.0.0",
"dotenv": "6.0.0",
"dotenv-expand": "4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ verifyTypeScriptSetup();
// @remove-on-eject-end

const path = require('path');
const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const fs = require('fs-extra');
const webpack = require('webpack');
const bfj = require('bfj');
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ process.on('unhandledRejection', err => {
const fs = require('fs-extra');
const path = require('path');
const execSync = require('child_process').execSync;
const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const paths = require('../config/paths');
const createJestConfig = require('./utils/createJestConfig');
const inquirer = require('react-dev-utils/inquirer');
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ process.on('unhandledRejection', err => {

const fs = require('fs-extra');
const path = require('path');
const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const execSync = require('child_process').execSync;
const spawn = require('react-dev-utils/crossSpawn');
const { defaultBrowsers } = require('react-dev-utils/browsersHelper');
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ verifyTypeScriptSetup();
// @remove-on-eject-end

const fs = require('fs');
const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const clearConsole = require('react-dev-utils/clearConsole');
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'use strict';

const fs = require('fs');
const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const paths = require('../../config/paths');

module.exports = (resolve, rootDir, isEjecting) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/utils/verifyPackageTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const fs = require('fs');
const path = require('path');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

const chalk = require('chalk');
const chalk = require('react-dev-utils/chalk');
const fs = require('fs');
const resolve = require('resolve');
const path = require('path');
Expand Down

0 comments on commit 47e9e2c

Please sign in to comment.