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

"npm run clean-up-svg-icons" ignores input parameters #14912

Closed
timothydavis opened this issue Aug 31, 2023 · 2 comments · Fixed by #15055
Closed

"npm run clean-up-svg-icons" ignores input parameters #14912

timothydavis opened this issue Aug 31, 2023 · 2 comments · Fixed by #15055
Assignees
Labels
squad:ccx Issue to be handled by the CCX team. squad:platform Issue to be handled by the Platform team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide).

Comments

@timothydavis
Copy link

Origin URL

https://ckeditor.com/docs/ckeditor5/latest/framework/contributing/development-environment.html

Project version

39.0.1

Is the information outdated? How?

The clean-up-svg-icons package doesn't seem to exist. cleanup-svg-icons uses an old library and no longer works.

Can you look at what is a proper way to exclude SVG checks perhaps or clean these up?

Is there something missing in the guide? What is it?

No response

Is there anything else you would like to add?

No response

User agent

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

@timothydavis timothydavis added squad:ccx Issue to be handled by the CCX team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide). labels Aug 31, 2023
@Witoso
Copy link
Member

Witoso commented Sep 11, 2023

@pomek do you know something about this script or an alternative?

@pomek
Copy link
Member

pomek commented Sep 11, 2023

The clean-up-svg-icons script was recently rewritten from its bash version to Node.js syntax.

execSync( `svgo --config=./scripts/svgo.config.js -i ${ pathToIcon }` );

Unfortunately, we weren't aware that our docs use it too. Currently, there is no option to pass a single icon to optimize. It sounds like a feature request in the new tool or a bug fix - restore what we removed during the migration.

Scope

  • When running the clean-up-svg-icons script with no arguments, process all SVG icons.
  • When specified paths (glob patterns or paths), use the input and process only mentioned files.
    • npm run clean-up-svg-icons packages/ckeditor5-core/theme/icons/*.svg - process all Core icons
    • npm run clean-up-svg-icons packages/ckeditor5-core/theme/icons/*.svg packages/ckeditor5-basic-styles/eme/icons/bold.svg - process all Core icons and Bold from basic-style

@Witoso Witoso added the squad:platform Issue to be handled by the Platform team. label Sep 11, 2023
@pomek pomek changed the title Docs issue report from "framework/contributing/development-environment.html" "npm run clean-up-svg-icons" ignores input parameters Sep 25, 2023
@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Sep 25, 2023
@psmyrek psmyrek self-assigned this Sep 25, 2023
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Sep 25, 2023
pomek added a commit that referenced this issue Sep 25, 2023
Other: Added support to execute `yarn run clean-up-svg-icons` script without arguments to optimize all icons in the entire project. Closes #14912.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Sep 25, 2023
@CKEditorBot CKEditorBot added this to the iteration 67 milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:ccx Issue to be handled by the CCX team. squad:platform Issue to be handled by the Platform team. type:docs This issue reports a task related to documentation (e.g. an idea for a guide).
Projects
None yet
5 participants