Skip to content

Conversation

Lyrkan
Copy link
Collaborator

@Lyrkan Lyrkan commented Nov 25, 2017

This PR fixes #204 by detecting the --json and -j options and:

  • removing some console.log calls
  • removing the FriendlyErrorsWebpackPlugin
  • Using default stats values

As said in that comment of the related issue the --silent option has to be used with yarn run encore or yarn encore and must be placed before the name of the script.

For instance:

# Works
./node_modules/.bin/encore production --json
yarn run --silent encore production  --json
yarn --silent encore production  --json

# Doesn't work (some lines being added by yarn)
yarn run encore production --json
yarn encore production --json

# Doesn't work (since Webpack doesn't know the --silent option)
yarn run encore production --silent --json
yarn encore production --silent --json

Edit: Forgot to add a test yesterday, should be good now :)

@Lyrkan Lyrkan added the Bug Bug Fix label Dec 4, 2017
@weaverryan weaverryan merged commit 0851b1d into symfony:master Dec 31, 2017
@weaverryan
Copy link
Member

Thanks @Lyrkan :). Sorry for the very slow merge - will start catching up soon (this was a very easy merge!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix support for --json option
2 participants