Skip to content
Permalink
Browse files

Replace help.txt with a template string

  • Loading branch information...
Rowno committed Aug 4, 2017
1 parent f308cfd commit 0e8e35979e40e90db70111c643749fdc93a7af01
Showing with 13 additions and 14 deletions.
  1. +1 −0 .gitignore
  2. +12 −5 lib/cli.js
  3. +0 −9 lib/help.txt
@@ -1 +1,2 @@
/node_modules/
/coverage/
@@ -10,14 +10,21 @@ const updateNotifier = require('update-notifier')
const sitemapUrls = require('../')
const pkg = require('../package.json')

const HELP_FILE_PATH = path.join(__dirname, 'help.txt')
const help = `
Usage: sitemap-urls <path> [<options>]
Path:
Path to a file containing an XML sitemap.
This parameter is ignored when the sitemap is being piped.
Options:
-h, --help Show this help text.
-v, --version Print sitemap-urls' version.
`.trim()

updateNotifier({pkg}).notify()

const cli = meow({
pkg,
help: fs.readFileSync(HELP_FILE_PATH, {encoding: 'utf8'}).trim()
}, {
const cli = meow({pkg, help}, {
alias: {
help: 'h',
version: 'v'

This file was deleted.

0 comments on commit 0e8e359

Please sign in to comment.
You can’t perform that action at this time.