Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack verbose #401

Merged
merged 3 commits into from
Mar 12, 2017
Merged

Webpack verbose #401

merged 3 commits into from
Mar 12, 2017

Conversation

matteofigus
Copy link
Member

Fixes #377

I tested it locally and seems to work nicely :)
Can you have a look at it @nickbalestra?

Copy link
Contributor

@nickbalestra nickbalestra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, I've added a couple of Qs


var webpackDefaults = {
var webpackVerbose = {
stats: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that verbosity is hidden behind a flag, It might be better to rely on some more verbose presets that webpack offers.
What about stats: "verbose" orstats: "normal"?

@@ -17,9 +20,10 @@ var webpackDefaults = {
module.exports = function packageServerScript(params, callback){
var fileName = 'server.js';
var publishPath = params.publishPath;
var webpackParams = params.verbose ? webpackVerbose : webpackDefault;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not doing all this logic at the time you define the webpackParams?

i.e:

webpackParams = {
  stats: params.verbose ? 'verbose' : 'errors-only'
}


var packageOptions = {
componentPath: dir,
minify: false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does minify do ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minification of js/css static assets

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the PR for webpack verbosity? Or the PR scope changed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. I changed the signature there, not altering the behaviour. The false there was for minify

@@ -12,12 +12,10 @@ var getUnixUtcTimestamp = require('../../utils/get-unix-utc-timestamp');
var validator = require('../../registry/domain/validators');

module.exports = function(){
return function(componentPath, minify, callback){
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this signature to accept an options parameter instead of adding another one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if we should have a minify option at all, but probably I'm missing some context. Why would we want to set minify, what are we trying to solve?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minify is been there for a long time. It is not referred to server.js, not to template.js, but to actual static contents in the static folders. It is set component based on the package.json, and we use it for some components at opentable. I can show you some examples on Monday.

@matteofigus matteofigus merged commit 0b9ec42 into master Mar 12, 2017
@matteofigus matteofigus deleted the webpack-verbose branch March 12, 2017 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants