woocommerce / qit-cli

A Testing Platform for WordPress Plugins and Themes
https://qit.woo.com
15 stars 2 forks source link

Add `woo:validate-zip <path>` command to docs #169

Closed rcstr closed 3 months ago

rcstr commented 4 months ago

add to our documentation, I think under "Managed Tests" might make the most sense, and we can mention the files and folder structures this checks for to provide more context for the user, then in a follow up task, add a link to the docs in the results. Let me know your thoughts!

Originally posted by @zhongruige in https://github.com/woocommerce/qit-cli/pull/163#pullrequestreview-2053904117

rcstr commented 4 months ago

Validating ZIP Files

The woo:validate-zip command ensures the contents of a local ZIP file meet specific criteria.

Command Usage:

qit woo:validate-zip <path-to-zip-file>

Example:

qit woo:validate-zip /path/to/my-extension.zip

Validation Criteria:

woo:validate-zip command checks the following:

Example Folder Structure

Here is an example of a valid folder structure for a ZIP file:

my-extension.zip
├── my-extension/
│   ├── my-extension.php
│   ├── includes/
│   │   └── class-my-extension.php
│   └── assets/
│       └── css/
│           └── style.css
rcstr commented 4 months ago

@zhongruige—I have added a draft to document this command (https://github.com/woocommerce/qit-cli/issues/169#issuecomment-2113193095). Let me know what you think.

Besides where to add, I think https://qit.woo.com/docs/cli/useful-commands or https://qit.woo.com/docs/category/local-test-environment will fit best. What do you think?

zhongruige commented 4 months ago

I really like that @rcstr, and I think that is perfect for the documentation.

where to add

Good question--I think adding it under https://qit.woo.com/docs/cli/useful-commands makes the most sense. We can probably then break that page out with meaningful headers for each command, something like:


## List extensions

Lorem ipsum

## List tests

Lorem ipsum

## View a single test

Lorem ipsum

## Validate zip

Lorem ipsum

It doesn't have to be the exact order as above, feel free to re-arrange in the order you feel makes sense, but this will help to make the document easier to navigate and we get the nice bonus side bar navigation on the right-hand size, like on this page: https://qit.woo.com/docs/environment/getting-started

rcstr commented 4 months ago

@zhongruige I have opened a PR to update the docs https://github.com/woocommerce/qit-documentation/pull/32