-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ash-shell/br.remove-core
Clean README, remove all references to ash core
- Loading branch information
Showing
2 changed files
with
17 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,40 +4,39 @@ Slugify is an [Ash](https://github.com/ash-shell/ash) module that allows you to | |
|
||
## Getting started | ||
|
||
### Ash Users | ||
You're going to have to install [Ash](https://github.com/ash-shell/ash) to use this module. | ||
|
||
Slugify is part of the Ash core, so you won't need to install it. | ||
After you have Ash installed, run either one of these two commands depending on your git clone preference: | ||
|
||
You can either call Slugify straight from the command line, or as an imported library. | ||
- `ash apm:install https://github.com/ash-shell/slugify.git` | ||
- `ash apm:install [email protected]:ash-shell/slugify.git` | ||
|
||
#### Command Line Usage | ||
You can optionally install this globally by adding `--global` to the end of the command. | ||
|
||
```sh | ||
ash slugify "Some, String" | ||
``` | ||
## Usage | ||
|
||
Will output: | ||
You can either call Slugify straight from the command line, or as an imported library. | ||
|
||
```sh | ||
<< Slugify >>: some-string | ||
``` | ||
### Command Line Usage | ||
|
||
#### Module Usage | ||
Check out the [HELP.txt](HELP.txt) file for command line usage. You can also run `ash slugify:help` in the terminal. | ||
|
||
Even though Slugify is part of the Ash core, you will still need to import it into your modules. | ||
### Imported Library Usage | ||
|
||
Add this line to the top of any file called from Ash: | ||
Before you can use Slugify in your modules, you must import it: | ||
|
||
```bash | ||
Ash__import "slugify" | ||
Ash__import "github.com/ash-shell/slugify" | ||
``` | ||
|
||
After including this library, you are free to start using it. | ||
|
||
The main function that you'll want to use is `Slugify__slugify`. Here is some example usage: | ||
##### Slugify__slugify | ||
|
||
The main function available in this library is `Slugify__slugify`. Here is some example usage: | ||
|
||
```sh | ||
slug="$(Slugify__slugify "Some, String")" | ||
slug="$(Slugify__slugify "Some String")" | ||
echo "$slug" | ||
``` | ||
|
||
|
@@ -47,10 +46,6 @@ Will output: | |
some-string | ||
``` | ||
|
||
### Non Ash Users | ||
Follow the same usage as described in "Module Usage", but instead of using `Ash__import "slugify"` use `. {path_to_slugify}/lib/slugify.sh`. | ||
## License | ||
|
||
[MIT](LICENSE.md) |