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

I want to know which files are being deleted when i using cmd slim build #534

Open
AlberHwang422 opened this issue Jun 9, 2023 · 3 comments

Comments

@AlberHwang422
Copy link

I would like to know if there is a way to find out which files are being deleted during compression when using slim build to compress an image.

@kcq
Copy link
Member

kcq commented Jun 9, 2023

There's a "long" way to do it with the xray command. You can xray your original image and then you can xray the minified image, which will give you the information about the files in each image. and then you would subtract the file list of the minified image from the file list of your original image (will require a bit of jq magic to get the right data from the slim report json file).

There's an easy way using the Slim SaaS (totally free). You just need to make sure that both images are in a registry the SaaS can connect to. Then you use the "diff"/"compare" image option and you'll get a nice view that show's what's removed and what's still there.

@PerseidMeteor
Copy link

Hi, @kcq ,is there any report or log method for me to know what files has been detected when using slim build?

@kcq
Copy link
Member

kcq commented Apr 17, 2024

@PerseidMeteor yes, the creport json file in the artifacts directory will give you that info. The console output will show you the artifacts directory where you'll find it. There's also a flag to copy it to your current directory or another location (--copy-meta-artifacts .) where you execute the build command.

You can also get a trace log of data events that's useful too. It's disabled by default. Use the --enable-mondel flag (you'll get a file called model.ndjson in the artifacts directory).

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

No branches or pull requests

3 participants