Skip to content

Commit

Permalink
Generated client/package.json creates production builds using webpack…
Browse files Browse the repository at this point in the history
… by default (#895)

Adds `-p` option to generated files.
  • Loading branch information
serodriguez68 authored and justin808 committed Jul 17, 2017
1 parent c0bdd19 commit e6edd4f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project's source code will be documented in this fil
Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.

## [Unreleased]
### [8.0.6]
#### fixed
- The package.json file created by the generator now creates minified javascript production builds by default. This was done by adding the -p flag to webpack on the build:production script.

Changes since last non-beta release.

*Please add entries here for your pull requests.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build:test": "NODE_ENV=test webpack --config webpack.config.js",
"build:production": "NODE_ENV=production webpack --config webpack.config.js",
"build:production": "NODE_ENV=production webpack -p --config webpack.config.js",
"build:development": "NODE_ENV=development webpack -w --config webpack.config.js"
},
"cacheDirectories": ["node_modules", "client/node_modules"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@
assert_match("registration", contents)
end
end

it "creates a client/package.json file configured to create production builds" do
production_script = "NODE_ENV=production webpack -p --config webpack.config.js"
assert_file("client/package.json") do |contents|
assert_match(production_script, contents)
end
end
end

0 comments on commit e6edd4f

Please sign in to comment.