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

No option --skip-image-compression #1427

Closed
Balandat opened this issue Apr 30, 2019 · 13 comments · Fixed by #1478
Closed

No option --skip-image-compression #1427

Balandat opened this issue Apr 30, 2019 · 13 comments · Fixed by #1478
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR.

Comments

@Balandat
Copy link

🐛 Bug Report

Docusaurus seems to have lost its --skip-image-compression option.

Filing this as a bug report because

  1. the docs talk still show this option: https://github.com/facebook/Docusaurus/blob/master/docs/api-commands.md#docusaurus-build
  2. not being able to do this messes up an svg that I'm using

Have you read the Contributing Guidelines on issues?

Yep

To Reproduce

yarn build --skip-image-compression

My package.json:

{
  "scripts": {
    "examples": "docusaurus-examples",
    "start": "docusaurus-start",
    "build": "docusaurus-build",
    "publish-gh-pages": "docusaurus-publish",
    "write-translations": "docusaurus-write-translations",
    "version": "docusaurus-version",
    "rename-version": "docusaurus-rename-version"
  },
  "devDependencies": {
    "docusaurus": "^1.9.0"
  }
}

Expected behavior

Image compression steps should be skipped

Actual Behavior

Errors out: error: unknown option --skip-image-compression'`

@JoelMarcey
Copy link
Contributor

hmmm... seems to be there.

packages/docusaurus-1.x/lib/server/generate.js:40:  commander.option('--skip-image-compression').parse(process.argv);

Looking at https://docusaurus.io/docs/en/commands#using-arguments

What happens if you try:

yarn run build --skip-image-compression

@Balandat
Copy link
Author

The same, I had tried that. The option doesn't even seem to be recognized:

yarn run build --help
Using globally installed version of Yarn
yarn run v1.12.1
warning package.json: No license field
$ docusaurus-build --help
Usage: docusaurus-build [options]

Options:
  --skip-next-release
  -h, --help           output usage information

facebook-github-bot pushed a commit to pytorch/botorch that referenced this issue Apr 30, 2019
Summary:
Docusaurus runs image compression under the hood, which messes up the botorch logo lockup svg.

It used to be possible to skip this compression but apparently b/c of a bug in docusaurus that's not possible on recent versions: facebook/docusaurus#1427

We'll have to hack this until that is fixed.
Pull Request resolved: #128

Reviewed By: ldworkin

Differential Revision: D15148030

Pulled By: Balandat

fbshipit-source-id: 619eecba6c28c105499a7c9a0368977026736f2b
@endiliey endiliey added bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR. labels Apr 30, 2019
@ahmadalfy
Copy link
Contributor

I created that feature and I can check why it stopped working. I am also interested in knowing why the compressor corrupt the photo, that shouldn't happen

@yangshun
Copy link
Contributor

yangshun commented May 1, 2019

Thanks @ahmadalfy! It was nice meeting you in person today as well 😄

@Balandat
Copy link
Author

Balandat commented May 1, 2019

@ahmadalfy I now think the compressor did not corrupt the image. I ran into a really weird thing when just copying the svg to a new file messed up the rendering. There must be something really fishy going on with that image.

@endiliey
Copy link
Contributor

endiliey commented May 1, 2019

I now think the compressor did not corrupt the image. I ran into a really weird thing when just copying the svg to a new file messed up the rendering. There must be something really fishy going on with that image.

@Balandat do you want to share the image here ? Maybe someone might be able to check that image/ give some suggestion on that.

Nevertheless, it's still true that this --skip-image-compression suddenly went missing. Thanks for reporting 😉

@endiliey
Copy link
Contributor

I think the skipNextRelease PR broke this.
#1292

Basically all of our command went missing.

image

@aeneasr
Copy link
Contributor

aeneasr commented May 21, 2019

Can this please be released? For me, all SVGs are broken due to minification and I'm not able to disable it.

@endiliey
Copy link
Contributor

endiliey commented May 21, 2019

1.10.0

@aeneasr
Copy link
Contributor

aeneasr commented May 21, 2019

Oh yeah and here are the two SVGs in case someone want's to see what's going on:

edit:// thank you @endiliey

@endiliey
Copy link
Contributor

Let me know if it doesn't work for you. I sent that fix. Need to know if it's working

@aeneasr
Copy link
Contributor

aeneasr commented May 21, 2019

Yup, works fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@ahmadalfy @yangshun @Balandat @aeneasr @JoelMarcey @endiliey and others