Skip to content

Commit

Permalink
fix: Fix a typo in a warning and add a warning for DEAD_CODE_ELIMINAT…
Browse files Browse the repository at this point in the history
…ION env variable.
  • Loading branch information
halfzebra committed Nov 5, 2018
1 parent f655eec commit 7666ee9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ if (!checkRequiredFiles([paths.appIndexJs, paths.appHtml])) {
process.exit(1);
}

// TODO: Remove this in the next major release.
if (typeof process.env.DEAD_CODE_ELIMINATION !== 'undefined') {
console.log(chalk.bold.green('Hello friend!'));
console.log();
console.log(
`It seems like you are still using "DEAD_CODE_ELIMINATION" variable`
);
console.log();
console.log('The good news is that it is no longer necessary.');
console.log('Create Elm App optimizes the assets by default.');
console.log();
}

// First, read the current file sizes in build directory.
// This lets us display how much they changed later.
measureFileSizesBeforeBuild(paths.appBuild)
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/warn.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function warn(elmJsonPath) {
console.log(chalk.yellow('Warning:'));
console.log();
console.log(
' Using elm.json for configuring "homebage" and "proxy" is deprecated.'
' Using elm.json for configuring "homepage" and "proxy" is deprecated.'
);
console.log(' This feature will be removed in the future versions.');
console.log();
Expand Down

0 comments on commit 7666ee9

Please sign in to comment.