diff --git a/README.md b/README.md index d92faba..fb83f2e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,14 @@ Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contr ## Using -This has only one command: +**DO NOT ATTEMPT TO USE THIS PLUGIN WITH ANY THEME NOT BASED ON [SAGE](https://github.com/roots/sage)** +It will almost certainly fail. + +### Compiling + +#### `compile` + +The primary function of this plugin is to compile Blades on demand. ``` wp blade compile @@ -25,6 +32,36 @@ wp blade compile --directory=path/to/files The directory is relative to your theme root. +### Clearing + +Sometimes you want to clear out your Blade cache! This plugin can help you do that too. + +#### `clear` + +``` +wp blade clear +``` + +This will look at all your Blades and remove their cached versions. It will _only_ remove cached files for existing Blades; it will _not_ clear out everything in your Blade cache directory. + +It takes the same `--directory` argument as `compile`, and will only remove cached files for those Blades in the passed directory. For instance, if you pass: + +``` +wp blade clear --directory=path/to/files +``` + +Then _only_ the cached versions of files in `path/to/files` will be deleted. + +If you want to clear out your entire cache (i.e. you have removed a Blade template), then use `wipe`. + +#### `wipe` + +``` +wp blade wipe +``` + +This function takes no arguments, and simply removes every file it finds in your Blade cache. It determines where the cache is by calling Sage's `App\config('view.compiled')`; + ## Installing Installing this package requires WP-CLI v1.1.0 or greater. Update to the latest stable release with `wp cli update`. @@ -41,9 +78,9 @@ Contributing isn’t limited to just code. We encourage you to contribute in the Think you’ve found a bug? We’d love for you to help us get it fixed. -Before you create a new issue, you should [search existing issues](https://github.com/alwaysblank/blade-cache-management/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version. +Before you create a new issue, you should [search existing issues](https://github.com/alwaysblank/blade-generator/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version. -Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/alwayblank/blade-cache-management/issues/new) with the following: +Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/alwayblank/blade-generator/issues/new) with the following: 1. What you were doing (e.g. "When I run `wp post list`"). 2. What you saw (e.g. "I see a fatal about a class being undefined."). @@ -53,7 +90,7 @@ Include as much detail as you can, and clear steps to reproduce if possible. ### Creating a pull request -Want to contribute a new feature? Please first [open a new issue](https://github.com/alwaysblank/blade-cache-management/issues/new) to discuss whether the feature is a good fit for the project. +Want to contribute a new feature? Please first [open a new issue](https://github.com/alwaysblank/blade-generator/issues/new) to discuss whether the feature is a good fit for the project. Once you've decided to commit the time to seeing your pull request through, please follow our guidelines for creating a pull request to make sure it's a pleasant experience: @@ -62,5 +99,3 @@ Once you've decided to commit the time to seeing your pull request through, plea 3. Include functional tests with your changes. [Read the WP-CLI documentation](https://wp-cli.org/docs/pull-requests/#functional-tests) for an introduction. 4. Follow the [WordPress Coding Standards](http://make.wordpress.org/core/handbook/coding-standards/). - -*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*