static-sitemap-cli
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "static-sitemap-cli", | ||
"description": "Simple CLI to pre-generate XML sitemaps for static sites locally.", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": "Jason Lee <jason@zerodevx.com>", | ||
"bin": { | ||
"static-sitemap-cli": "./bin/run" | ||
"static-sitemap-cli": "./bin/run", | ||
"sscli": "./bin/run" | ||
}, | ||
@@ -9,0 +10,0 @@ "bugs": "https://github.com/zerodevx/static-sitemap-cli/issues", |
@@ -25,10 +25,18 @@ # static-sitemap-cli | ||
By default outputs to `stdout`. So that you can pipe it to do other stuff. | ||
OR, because it's quite a mouthful: | ||
``` | ||
sscli https://example.com > sitemap.xml | ||
``` | ||
Where `sscli` is just an alias of `static-sitemap-cli`. CLI by default outputs to `stdout` - | ||
so that you can pipe it to do other cool stuff. | ||
### Arguments | ||
| Argument | Description | | ||
|----------|-------------| | ||
| BASEURL | Base URL that is prefixed to all location entries. For example: https://example.com/ | | ||
| Argument | Description | | ||
|----------|----------------------------------------------------------------------------------------| | ||
| BASEURL | Base URL that is prefixed to all location entries. For example: `https://example.com/` | | ||
@@ -42,3 +50,3 @@ | ||
| -v | --version | show CLI version | | ||
| -r | --root | [default: .] root dir to start from | | ||
| -r | --root | [default: ./] root dir to start from | | ||
| -m | --match | [default: .html] comma-separated list of extensions to match | | ||
@@ -76,2 +84,8 @@ | -i | --ignore | [default: 404.html] comma-separated list of globs to ignore | | ||
OR | ||
``` | ||
sscli https://example.com -r dist/ > dist/sitemap.xml | ||
``` | ||
Note: Just put `dist/` for that location, not `dist/.` or `./dist/**`. | ||
@@ -82,3 +96,3 @@ | ||
``` | ||
static-sitemap-cli https://example.com -i 404.html,foo/*.html > sm.xml | ||
sscli https://example.com -i 404.html,foo/*.html > sm.xml | ||
``` | ||
@@ -92,3 +106,3 @@ | ||
``` | ||
static-sitemap-cli https://example.com -p **/privacy-policy/**,0.1 **/terms-of-service/**,0.1 > sm.xml | ||
sscli https://example.com -p **/privacy-policy/**,0.1 **/terms-of-service/**,0.1 > sm.xml | ||
``` | ||
@@ -104,2 +118,6 @@ | ||
**v0.1.1 - 2019-07-27:** | ||
* Bugfix: properly check rootDir before replacing. | ||
* Add new alias `sscli` because the original is quite a mouthful. | ||
**v0.1.0 - 2019-07-26:** | ||
@@ -106,0 +124,0 @@ * Initial release. |
@@ -39,3 +39,3 @@ const {Command, flags} = require('@oclif/command'); | ||
} | ||
let url = files[a].replace(rootDir, '/'); | ||
let url = rootDir === './' ? files[a] : files[a].replace(rootDir, '/'); | ||
if (!flags['no-clean']) { | ||
@@ -90,3 +90,3 @@ if (url.slice(-5) === '.html') { | ||
description: 'root dir to start from', | ||
default: '.' | ||
default: './' | ||
}), | ||
@@ -93,0 +93,0 @@ match: flags.string({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8746
122