Verified Commit 8bd7ae2e authored by Aral Balkan's avatar Aral Balkan
Browse files

Update help

  - Sync-related options now display on Windows
  - Fixed issue with enable options appearing on non-systemd environments
parent dcc5f325
......@@ -127,13 +127,7 @@ class Help {
If ${usageCommand} is omitted, behaviour defaults to ${commandServe}.
${heading('Options:')}
${ this.isWindows ? `
For ${commandServe} command:
${optionDomain}\t\t\t\tThe main domain to serve (defaults to system hostname if not specified).
${optionAliases}\t\t\t\tAdditional domain aliases to obtain TLS certs for. Will 302 redirect to main domain.
${optionSkipDomainReachabilityCheck}\tDo not run pre-flight check for domain reachability.
` : `
For${ this.systemdExists ? ' both ' : '' } ${commandServe}${ this.systemdExists ? ` and ${commandEnable} ` : '' } command${ this.systemdExists ? 's' : '' }:
${optionDomain}\t\t\t\tThe main domain to serve (defaults to system hostname if not specified).
......@@ -147,10 +141,10 @@ class Help {
${optionLiveSync}\t\t\tWatch for changes and live sync them to a remote server.
${optionSyncFolderAndContents}\tSync local folder and contents (default is to sync the folder’s contents only).
For ${commandEnable} command:
${ this.systemdExists ? `For ${commandEnable} command:
${optionEnsureCanSync}\t\tEnsure server can rsync via ssh.
`}
` : ''}
${heading('Examples:')}
${heading('Develop using locally-trusted TLS certificates:')}
......@@ -166,14 +160,14 @@ class Help {
• Proxy ${argument('localhost:1313')} ⇄ https://localhost\t${prompt} ${appName} ${argument(':1313')}
(shorthand and full)\t\t\t${prompt} ${appName} ${commandServe} ${argument(':1313')} ${argument('@localhost:443')}
${ this.isWindows ? '' : `
• Sync ${argument('demo')} folder to ${argument('my.site')}\t\t${prompt} ${appName} ${argument('demo')} ${optionSyncTo}=${argument('my.site')}
• Ditto, but use account ${argument('me')} on ${argument('my.site')}\t${prompt} ${appName} ${argument('demo')} ${optionSyncTo}=${argument('me@my.site')}
• Ditto, but sync to remote folder ${argument('~/www')}\t${prompt} ${appName} ${argument('demo')} ${optionSyncTo}=${argument('me@my.site:www')}
• Ditto, but specify absolute path\t\t${prompt} ${appName} ${argument('demo')} ${optionSyncTo}=${argument('me@my.site:/home/me/www')}
• Live Sync current folder to ${argument('my.site')} \t${prompt} ${appName} ${optionSyncTo}=${argument('my.site')} ${optionLiveSync}
`}${ this.systemdExists ? `
${ this.systemdExists ? `
${heading('Stage and deploy using globally-trusted Let’s Encrypt certificates:')}
Regular process:
......@@ -204,7 +198,6 @@ class Help {
${heading('Windows-specific notes:')}
- Unlike Linux and macOS, you must use quotation marks around @localhost and @hostname.
- The sync feature, available on Linux and macOS, is not available on Windows as rsync is not available.
- Production use is not available on Windows as it requires Linux with systemd.
`: ''}${ this.isMac ? `
${heading('Mac-specific notes:')}
......@@ -214,7 +207,7 @@ class Help {
${heading('Linux-specific notes:')}
- Production use is not available on this Linux distribution as systemd does not exist.
- For production use, we currently recommend using Ubuntu 18.04 LTS.
- For production use, we currently recommend using Ubuntu 18.04 or 20.04 LTS.
`: ''}
${clr('For further information, please see https://sitejs.org', 'italic')}
`.replace(/^\n/, '')
......
......@@ -499,8 +499,6 @@ test('[commands] help', t => {
--sync-from The folder to sync from.
--live-sync Watch for changes and live sync them to a remote server.
--sync-folder-and-contents Sync local folder and contents (default is to sync the folder’s contents only).
For enable command:
--ensure-can-sync Ensure server can rsync via ssh.
Examples:
Develop using locally-trusted TLS certificates:
......@@ -537,7 +535,7 @@ test('[commands] help', t => {
Linux-specific notes:
- Production use is not available on this Linux distribution as systemd does not exist.
- For production use, we currently recommend using Ubuntu 18.04 LTS.
- For production use, we currently recommend using Ubuntu 18.04 or 20.04 LTS.
For further information, please see https://sitejs.org
......@@ -575,6 +573,11 @@ test('[commands] help', t => {
--aliases Additional domain aliases to obtain TLS certs for. Will 302 redirect to main domain.
--skip-domain-reachability-check Do not run pre-flight check for domain reachability.
--sync-to The host to sync to (other sync options only relevant if this is supplied).
--sync-from The folder to sync from.
--live-sync Watch for changes and live sync them to a remote server.
--sync-folder-and-contents Sync local folder and contents (default is to sync the folder’s contents only).
Examples:
Develop using locally-trusted TLS certificates:
• Serve current folder ▶ site
......@@ -587,6 +590,13 @@ test('[commands] help', t => {
• Proxy localhost:1313 ⇄ https://localhost ▶ site :1313
(shorthand and full) ▶ site serve :1313 "@localhost:443"
• Sync demo folder to my.site ▶ site demo --sync-to=my.site
• Ditto, but use account me on my.site ▶ site demo --sync-to=me@my.site
• Ditto, but sync to remote folder ~/www ▶ site demo --sync-to=me@my.site:www
• Ditto, but specify absolute path ▶ site demo --sync-to=me@my.site:/home/me/www
• Live Sync current folder to my.site ▶ site --sync-to=my.site --live-sync
Stage using globally-trusted Let’s Encrypt certificates:
• Serve current folder ▶ site "@hostname"
......@@ -602,7 +612,6 @@ test('[commands] help', t => {
Windows-specific notes:
- Unlike Linux and macOS, you must use quotation marks around @localhost and @hostname.
- The sync feature, available on Linux and macOS, is not available on Windows as rsync is not available.
- Production use is not available on Windows as it requires Linux with systemd.
For further information, please see https://sitejs.org
......@@ -643,8 +652,6 @@ test('[commands] help', t => {
--sync-from The folder to sync from.
--live-sync Watch for changes and live sync them to a remote server.
--sync-folder-and-contents Sync local folder and contents (default is to sync the folder’s contents only).
For enable command:
--ensure-can-sync Ensure server can rsync via ssh.
Examples:
Develop using locally-trusted TLS certificates:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment