From 79842a24bf8447e6b6bbe848e49134b03ad8b040 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 2 Sep 2016 19:09:39 +0100 Subject: [PATCH] Remove code that is unused after publish --- package.json | 6 +++--- scripts/start.js | 6 +++--- scripts/test.js | 6 ------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 39252a29776..dbd7cd21240 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,11 @@ "url": "https://github.com/facebookincubator/create-react-app/issues" }, "scripts": { - "build": "node scripts/build.js --debug-template", + "build": "node scripts/build.js", "create-react-app": "node global-cli/index.js --scripts-version \"$PWD/`tasks/clean_pack.sh`\"", "e2e": "tasks/e2e.sh", - "start": "node scripts/start.js --debug-template", - "test": "node scripts/test.js --debug-template --env=jsdom" + "start": "node scripts/start.js", + "test": "node scripts/test.js --env=jsdom" }, "files": [ "PATENTS", diff --git a/scripts/start.js b/scripts/start.js index 09e3a7f9248..9880330b1ce 100644 --- a/scripts/start.js +++ b/scripts/start.js @@ -27,10 +27,10 @@ var paths = require('../config/paths'); // Tools like Cloud9 rely on this. var DEFAULT_PORT = process.env.PORT || 3000; var compiler; - -// TODO: hide this behind a flag and eliminate dead code on eject. -// This shouldn't be exposed to the user. var handleCompile; + +// You can safely remove this after ejecting. +// We only use this block for testing of Create React App itself: var isSmokeTest = process.argv.some(arg => arg.indexOf('--smoke-test') > -1); if (isSmokeTest) { handleCompile = function (err, stats) { diff --git a/scripts/test.js b/scripts/test.js index b8d047333ad..d13aff38017 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -16,12 +16,6 @@ const paths = require('../config/paths'); const argv = process.argv.slice(2); -// Don't pass this option to Jest -const debugTemplateIndex = argv.indexOf('--debug-template'); -if (debugTemplateIndex !== -1) { - argv.splice(debugTemplateIndex, 1); -} - // Watch unless on CI if (!process.env.CI) { argv.push('--watch');