chore: make Prettier + fix spelling, update upgrade/switch instructions, prefer ale...
authorAJ ONeal <aj@therootcompany.com>
Sun, 15 Aug 2021 05:10:54 +0000 (05:10 +0000)
committerAJ ONeal <aj@therootcompany.com>
Sun, 15 Aug 2021 05:56:56 +0000 (05:56 +0000)
21 files changed:
_npm/scripts/install-webi.js
_webi/frontmarker.js
_webi/normalize.js
_webi/ua-detect.js
bat/README.md
dotenv-linter/README.md
golang/releases.js
gprox/README.md
k9s/README.md
kind/README.md
lsd/releases.js
mariadb/releases.js
node/README.md
pandoc/README.md
shfmt/releases.js
vim-beyondcode/README.md
vim-go/README.md
vim-leader/README.md
vim-prettier/README.md
webi/README.md
yq/releases.js

index 0718c1f3827756cce5c65d22ffb6833e9e0d713c..e8cf1891f073cc9749a4769a1b861cba16ffd51c 100755 (executable)
@@ -21,21 +21,20 @@ if (/^win/i.test(os.platform())) {
   return;
 }
 
-exec('curl -fsS https://webinstall.dev/webi | bash', function (
-  err,
-  stdout,
-  stderr
-) {
-  if (err) {
-    console.error(err);
-  }
-  if (stdout) {
-    console.info(stdout);
-  }
-  if (stderr) {
-    console.error(stderr);
+exec(
+  'curl -fsS https://webinstall.dev/webi | bash',
+  function (err, stdout, stderr) {
+    if (err) {
+      console.error(err);
+    }
+    if (stdout) {
+      console.info(stdout);
+    }
+    if (stderr) {
+      console.error(stderr);
+    }
   }
-});
+);
 /*
   .then(function () {
     // nada
index 34a24956ac952397de33a7952d2e12a62c8ff41a..ca5672164ff0038c2262089cd67d1effd35454f4 100644 (file)
@@ -80,8 +80,6 @@ module.exports.parse = parseYamlish;
 
 if (require.main === module) {
   console.info(
-    parseYamlish(
-      fs.readFileSync(__dirname + '/../node/README.md', 'utf8')
-    )
+    parseYamlish(fs.readFileSync(__dirname + '/../node/README.md', 'utf8'))
   );
 }
index 5232c2775b006fc8053b09c12048316c5dc0bb06..1c247f7b71e890a6905466bcfe8a8c77c041ee88 100644 (file)
@@ -39,7 +39,8 @@ var arches = [
 ];
 var archMap = {
   //amd64: /(amd.?64|x64|[_\-]64)/i,
-  amd64: /(\b|_|amd|(dar)?win(dows)?|mac(os)?|linux|osx|x)64([_\-]?bit)?(\b|_)/i,
+  amd64:
+    /(\b|_|amd|(dar)?win(dows)?|mac(os)?|linux|osx|x)64([_\-]?bit)?(\b|_)/i,
   //x86: /(86)(\b|_)/i,
   x86: /(\b|_|amd|(dar)?win(dows)?|mac(os)?|linux|osx|x)(86|32)([_\-]?bit)(\b|_)/i,
   ppc64le: /(\b|_)(ppc64le)/i,
index 315046ce5fb69dc0218746882603ebd0a2096226..6b972cb914b6b27e610027c19ee18a0d38f0860a 100644 (file)
@@ -57,7 +57,7 @@ function getArch(ua) {
   // quick hack for Apple Silicon M1
   // Native:  Darwin boomer.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64
   // Resetta: Darwin boomer.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 x86_64
-  ua = ua.replace(/xnu-.*RELEASE_[^\s]*/, '')
+  ua = ua.replace(/xnu-.*RELEASE_[^\s]*/, '');
   if (/aarch64|arm64|arm8|armv8/i.test(ua)) {
     return 'arm64';
   } else if (/aarch|arm7|armv7/i.test(ua)) {
index 090f165e2bcc1ad7ee9698af3a5e7b3724e1ea96..b263334345ccc6d44aa0e87b0175104b6bbe251a 100644 (file)
@@ -35,7 +35,8 @@ Update your `.bashrc`, `.zshrc`, or `.profile`
 alias cat="bat --style=plain"
 ```
 
-For situations in which you must use `cat` exactly, remember that you can escape the alias:
+For situations in which you must use `cat` exactly, remember that you can escape
+the alias:
 
 ```bash
 \cat foo
index 4306f86a8cb2b2e586477a7cd46e3f66e2d572bb..30a71409e03c22ab74c8121634aabb1f22120a1b 100644 (file)
@@ -22,8 +22,8 @@ You need to download and install the
 
 ## Cheat Sheet
 
-> Dotenv Linter is a lightning-fast check for your `.env` files.
-> It can rapidly detect and automatically fix issues.
+> Dotenv Linter is a lightning-fast check for your `.env` files. It can rapidly
+> detect and automatically fix issues.
 
 By default, `dotenv-linter` checks all `.env` files in the current directory:
 
@@ -43,7 +43,8 @@ To lint .env files recursively, use `-r`:
 dotenv-linter -r
 ```
 
-For the complete usage, see the official [Dotenv Linter Usage Guide](https://dotenv-linter.github.io/#/usage).
+For the complete usage, see the official
+[Dotenv Linter Usage Guide](https://dotenv-linter.github.io/#/usage).
 
 ### How to automatically fix errors
 
@@ -53,8 +54,8 @@ Use the `--fix` flag.
 dotenv-linter --fix
 ```
 
-Backup files in the format of `.env_0000000000` will be created by default.
-You can use `--no-backup` to skip this.
+Backup files in the format of `.env_0000000000` will be created by default. You
+can use `--no-backup` to skip this.
 
 ### How to toggle linter rules
 
index a9ad7de79c3b32272e216e9c3a0dc9ce6766db21..2e8a07815082d5ee7fce3301816751e3884df9fe 100644 (file)
@@ -4,7 +4,7 @@ var osMap = {
   darwin: 'macos'
 };
 var archMap = {
-  '386': 'x86'
+  386: 'x86'
 };
 
 function getAllReleases(request) {
index f8650bb15161f6c5d019b6cb9751281c4a156888..ae9e6cf48bd3408cc5cb106fe20772dd3508537f 100644 (file)
@@ -11,7 +11,13 @@ tagline: |
 
 ## Cheat Sheet
 
-`gprox` was built to be a no-dependency development tool for simply proxying HTTPS traffic to a local HTTP endpoint. It was written as a port of [local-ssl-proxy](https://github.com/cameronhunter/local-ssl-proxy), a perfectly good NodeJS app for the same purpose. But the benefit is that you can install `gprox` very simply from `webi` or `go` (if you must), and you dont have to worry at all about NodeJS versions, etc! Plus there isn't any elevated access given to an interpreter you dont know much about if you're using `webi`.
+`gprox` was built to be a no-dependency development tool for simply proxying
+HTTPS traffic to a local HTTP endpoint. It was written as a port of
+[local-ssl-proxy](https://github.com/cameronhunter/local-ssl-proxy), a perfectly
+good NodeJS app for the same purpose. But the benefit is that you can install
+`gprox` very simply from `webi` or `go` (if you must), and you dont have to
+worry at all about NodeJS versions, etc! Plus there isn't any elevated access
+given to an interpreter you dont know much about if you're using `webi`.
 
 The fastest way to get started is just by running:
 
@@ -20,25 +26,33 @@ gprox
 # example output
 # 9:12PM INF Running proxy! from=https://localhost:9001 to=http://localhost:9000
 ```
+
 And you're off to the races!
 
-That is... if you're app happens to be running on port `9000`. If not, no worries! Simply pass the target port option `-t, --target` and specify the port your app _is_ running on.
+That is... if you're app happens to be running on port `9000`. If not, no
+worries! Simply pass the target port option `-t, --target` and specify the port
+your app _is_ running on.
 
 ```bash
 gprox -t 8080
 ```
 
-Feeling like you should save this magic built-in cert so you can inspect it for anything?
+Feeling like you should save this magic built-in cert so you can inspect it for
+anything?
+
 ```bash
 gprox --dropcert
 ```
 
 Want to use your own cert/key?
+
 ```bash
 gprox -c testcert.crt -k testkey.key
 ```
 
-And for anything else, just use the `-h, --help` flag to get a little more information or refer to the [README](https://github.com/creedasaurus/gprox/blob/main/README.md):
+And for anything else, just use the `-h, --help` flag to get a little more
+information or refer to the
+[README](https://github.com/creedasaurus/gprox/blob/main/README.md):
 
 ```
 ❯ gprox --help
index c2bbd0768ed22267c94411f5a71a2d1caf26adc1..7bc72edf5e1f30af43e5ae50b0b676035d4a650c 100644 (file)
@@ -13,19 +13,24 @@ Use the `@beta` tag for pre-releases.
 
 ## Cheat Sheet
 
-The information in this section is a copy of the preflight requirements and common command line arguments from k9s (https://github.com/derailed/k9s).
+The information in this section is a copy of the preflight requirements and
+common command line arguments from k9s (https://github.com/derailed/k9s).
 
-> `k9s` aim is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with your observed resources.
+> `k9s` aim is to make it easier to navigate, observe and manage your
+> applications in the wild. K9s continually watches Kubernetes for changes and
+> offers subsequent commands to interact with your observed resources.
 
 ### Preflight check
 
-K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set accordingly.
+K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set
+accordingly.
 
 ```bash
 export TERM=xterm-256color
 ```
 
 To run k9s:
+
 ```bash
 k9s
 ```
@@ -33,26 +38,31 @@ k9s
 ### Command line arguments
 
 List all available CLI options
+
 ```bash
 k9s help
 ```
 
 To get info about K9s runtime (logs, configs, etc..)
+
 ```bash
 k9s info
 ```
 
 To run K9s in a given namespace
+
 ```bash
 k9s -n mycoolns
 ```
 
 Start K9s in an existing KubeConfig context
+
 ```bash
 k9s --context coolCtx
 ```
 
 Start K9s in readonly mode - with all cluster modification commands disabled
+
 ```bash
 k9s --readonly
 ```
index 4ff23d96430fa713e0f8af76e0cad66df49f051b..59e7742ca3086674202482657de08c60535338d0 100644 (file)
@@ -9,47 +9,58 @@ To update or switch versions, run `webi kind@stable` (or `@v2`, `@beta`,etc).
 
 ## Cheat Sheet
 
-> Kind uses a single docker container to run a lightweight kubernetes cluster for testing and shenanigans
+> Kind uses a single docker container to run a lightweight kubernetes cluster
+> for testing and shenanigans
 
 User Guide - Quick Start: https://kind.sigs.k8s.io/docs/user/quick-start
 
 To create a cluster with default name
+
 ```bash
 kind create cluster
 ```
 
 Create a cluster with a specific name
+
 ```bash
 kind create cluster --name foo
 ```
 
 List clusters
+
 ```bash
 kind get clusters
 ```
 
 Specify Kubernetes version
+
 ```bash
 kind create cluster --image "kindest/node:$favoriteTag"
 ```
-- pick your $favoriteTag from here: https://hub.docker.com/r/kindest/node/tags?page=1&ordering=last_updated
+
+- pick your \$favoriteTag from here:
+  https://hub.docker.com/r/kindest/node/tags?page=1&ordering=last_updated
 
 Export all logs from a cluster
+
 ```bash
 kind exports logs $HOME/somedir
 ```
 
 To delete a cluster with default name
+
 ```bash
 kind delete cluster
 ```
 
 To delete a cluster with specific name
+
 ```bash
 kind delete cluster --name foo
 ```
 
 Get the kubeconfig of a cluster
+
 ```bash
 kind get kubeconfig --name foo
 ```
index 24ae092ff369aa51267c3879e0349f19a9570390..f436a10e5471ca1ea127afa881e7b332cf732790 100644 (file)
@@ -7,7 +7,7 @@ var repo = 'lsd';
 module.exports = function (request) {
   return github(request, owner, repo).then(function (all) {
     all.releases = all.releases.filter(function (rel) {
-      return !/(-musl\.)|(-msvc\.)|(\.deb$)/.test(rel.name)
+      return !/(-musl\.)|(-msvc\.)|(\.deb$)/.test(rel.name);
     });
     return all;
   });
index 0c3ca309eec8ba495fd367ea4ac4e6fb69af8aaa..4c0c446b98e93c9568f56c0aa46e18475357ed8d 100644 (file)
@@ -38,10 +38,11 @@ module.exports = function (request) {
         date: ver.date,
         os: 'linux',
         arch: 'amd64',
-        download: 'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86_64/mariadb-{{ v }}-linux-x86_64.tar.gz'.replace(
-          /{{ v }}/g,
-          ver.version
-        )
+        download:
+          'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86_64/mariadb-{{ v }}-linux-x86_64.tar.gz'.replace(
+            /{{ v }}/g,
+            ver.version
+          )
       });
       all.releases.push({
         version: ver.version,
@@ -50,10 +51,11 @@ module.exports = function (request) {
         date: ver.date,
         os: 'linux',
         arch: 'amd64',
-        download: 'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86/mariadb-{{ v }}-linux-x86.tar.gz'.replace(
-          /{{ v }}/g,
-          ver.version
-        )
+        download:
+          'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86/mariadb-{{ v }}-linux-x86.tar.gz'.replace(
+            /{{ v }}/g,
+            ver.version
+          )
       });
 
       // windows
@@ -64,10 +66,11 @@ module.exports = function (request) {
         date: ver.date,
         os: 'windows',
         arch: 'amd64',
-        download: 'http://archive.mariadb.org/mariadb-{{ v }}/winx64-packages/mariadb-{{ v }}-winx64.zip'.replace(
-          /{{ v }}/g,
-          ver.version
-        )
+        download:
+          'http://archive.mariadb.org/mariadb-{{ v }}/winx64-packages/mariadb-{{ v }}-winx64.zip'.replace(
+            /{{ v }}/g,
+            ver.version
+          )
       });
       all.releases.push({
         version: ver.version,
@@ -76,10 +79,11 @@ module.exports = function (request) {
         date: ver.date,
         os: 'windows',
         arch: 'x86',
-        download: 'http://archive.mariadb.org/mariadb-{{ v }}/win32-packages/mariadb-{{ v }}-win32.zip'.replace(
-          /{{ v }}/g,
-          ver.version
-        )
+        download:
+          'http://archive.mariadb.org/mariadb-{{ v }}/win32-packages/mariadb-{{ v }}-win32.zip'.replace(
+            /{{ v }}/g,
+            ver.version
+          )
       });
 
       // Note: versions are sorted most-recent first.
@@ -139,7 +143,8 @@ module.exports = function (request) {
         // </tr><tr><td><a href="/mariadb/10.0.36/">10.0.36</a></td><td>2018-08-01</td><td>Stable</td>
         //
         // To this:
-        var reVer = /<tr>.*mariadb\/(10[^\/]+)\/">.*(20\d\d-\d\d-\d\d)<\/td><td>(\w+)<\/td>/;
+        var reVer =
+          /<tr>.*mariadb\/(10[^\/]+)\/">.*(20\d\d-\d\d-\d\d)<\/td><td>(\w+)<\/td>/;
         //
         // { "version": "10.0.36", "date": "2018-08-01", "channel": "stable" }
 
index bd80d10b50d325145d0ccd108c9af0c2df22cf03..bfbd5b32ed77593b78f0c48be4e3a2e458ad336a 100644 (file)
@@ -82,7 +82,7 @@ npm install --save express
 var express = require('express');
 var app = express();
 
-app.use('/', function(req, res, next) {
+app.use('/', function (req, res, next) {
   res.end('Hello, World!');
 });
 
@@ -97,7 +97,7 @@ module.exports = app;
 var http = require('http');
 var app = require('./app.js');
 
-http.createServer(app).listen(8080, function() {
+http.createServer(app).listen(8080, function () {
   console.info('Listening on', this.address());
 });
 ```
index 55d1c504422d3410e508ca8ea6ca107d5401c1e8..f31bdca89e9887fbeedc059247580b9fc518a27d 100644 (file)
@@ -15,7 +15,8 @@ Use the `@beta` tag for pre-releases.
 
 ## Cheat Sheet
 
-> Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.
+> Pandoc is a Haskell library for converting from one markup format to another,
+> and a command-line tool that uses this library.
 
 ```bash
 pandoc -o output.html input.txt
index e6cb0173550dac621b621cb6c9d2f0b7b379c78d..85aa2762a5694288c1c7507a3a5dd5bf709e7a5d 100644 (file)
@@ -4,16 +4,16 @@ var github = require('../_common/github.js');
 var owner = 'mvdan';
 var repo = 'sh';
 
-module.exports = function(request) {
-       return github(request, owner, repo).then(function(all) {
-               return all;
-       });
+module.exports = function (request) {
+  return github(request, owner, repo).then(function (all) {
+    return all;
+  });
 };
 
 if (module === require.main) {
-       module.exports(require('@root/request')).then(function(all) {
-               all = require('../_webi/normalize.js')(all);
-               all.releases = all.releases.slice(0, 5);
-               console.info(JSON.stringify(all, null, 2));
-       });
+  module.exports(require('@root/request')).then(function (all) {
+    all = require('../_webi/normalize.js')(all);
+    all.releases = all.releases.slice(0, 5);
+    console.info(JSON.stringify(all, null, 2));
+  });
 }
index 08c48a14d9ca52d787a94028f02e05153f60b0ce..b556c5664037ecf95b7c5babb665789fd1909e66 100644 (file)
@@ -22,5 +22,5 @@ It includes many of the vim plugins available on webinstall.dev such as:
 - [vim-spell](/vim-spell)
 - [vim-lastplace](/vim-lastplace)
 - [vim-viminfo](/vim-viminfo)
-- [vim-syntastic](/vim-syntastic)
+- [vim-ale](/vim-ale)
 - [vim-prettier](/vim-prettier)
index 1e1f31a5846b974f0415511be9e301354a3115e7..7b4e6ab29bbb63b529c9e5b1dc51a88c26bd1d3a 100644 (file)
@@ -5,19 +5,16 @@ tagline: |
   vim-go adds Go language support for Vim.
 ---
 
-## Updating `vim-go`
-
-```bash
-webi vim-go
-```
+To update (replacing the current version) run `webi vim-go`.
 
 ## Cheat Sheet
 
-> `vim-go` provides integration with various official and 3rd part go tooling
+> `vim-go` provides integration with various official and 3rd party go tooling
 > for linting, vetting, etc.
 
-You'll also need `ALE`, [`syntastic`](https://webinstall.dev/vim-syntastic), or
-similar.
+You'll also need to install [`ALE`](https://webinstall.dev/vim-ale) (part of
+[`vim-essentials`](https://webinstall.dev/vim-essentials)) or
+[`syntastic`](https://webinstall.dev/vim-syntastic) first.
 
 ### How to install by hand
 
index fc45b46e4d3dde9cef54617a818c9084a6f758d1..63092f9c0f12dda4c1f8212904c499869ba87d64 100644 (file)
@@ -14,7 +14,7 @@ To update (replacing the current version) run `webi vim-leader`.
 The `<Leader>` key is typically used for your own custom shortcuts.
 
 By default it's mapped to `\` (backslash) - a legacy from a time when `\` was in
-a more accessible place - but most people remap it to `,` or ` ` (space).
+a more accessible place - but most people remap it to `,` or `` (space).
 
 This vim-leader plugin makes Space the Leader key, but also remaps `\` and `,`
 as aliases.
index f030aaabf59d4cc296605f0b0b9840121510d24d..275f83f1ab3d9792134d20d67fdd9d8f7a16b830 100644 (file)
@@ -12,8 +12,9 @@ To update (replacing the current version) run `webi vim-prettier`.
 > `vim-prettier` is a vim plugin wrapper for prettier, pre-configured with
 > custom default prettier settings.
 
-You'll also need `ALE`, [`syntastic`](https://webinstall.dev/vim-syntastic), or
-similar.
+You'll also need to install [`ALE`](https://webinstall.dev/vim-ale) (part of
+[`vim-essentials`](https://webinstall.dev/vim-essentials)) or
+[`syntastic`](https://webinstall.dev/vim-syntastic) first.
 
 ### How to install by hand
 
index 872a9d66c1ae8161bc1f2417900f9e96176ce1d0..da5585bec33bab796945070c9fe69d61c8301843 100644 (file)
@@ -68,8 +68,9 @@ These are the files that are installed when you use [webinstall.dev](/):
 ~/.local/opt/pathman-*
 ```
 
-Assuming that you don't use `pathman` for anything else, you can safely remove all of them.
-If you use [webinstall.dev](/) again in the future they will be reinstalled.
+Assuming that you don't use `pathman` for anything else, you can safely remove
+all of them. If you use [webinstall.dev](/) again in the future they will be
+reinstalled.
 
 Additionally, these files may be modified to update your `PATH`:
 
@@ -84,13 +85,15 @@ It's probably best to leave them alone.
 
 ### How to uninstall Webi-installed programs
 
-Except where noted otherwise (such as `wsl`) Webi installs everything into `~/.local/bin` and `~/.local/opt`.
+Except where noted otherwise (such as `wsl`) Webi installs everything into
+`~/.local/bin` and `~/.local/opt`.
 
-Some programs also use `~/.local/share` or `~/.config` - such as `postgres` and `fish` - and
-some use program-specific directories - such as Go, which uses `~/go/bin`.
+Some programs also use `~/.local/share` or `~/.config` - such as `postgres` and
+`fish` - and some use program-specific directories - such as Go, which uses
+`~/go/bin`.
 
-If you want to remove any of them, simply deleting them should do well enough - just check the Cheat Sheet
-for any special notes.
+If you want to remove any of them, simply deleting them should do well enough -
+just check the Cheat Sheet for any special notes.
 
 Here are some examples:
 
index 8ef95a7c9a25404298fb2ef53c50c411b0ae5fb6..cf78b08aae44f92b48d24ece0834a22bf8b372c8 100644 (file)
@@ -4,16 +4,16 @@ var github = require('../_common/github.js');
 var owner = 'mikefarah';
 var repo = 'yq';
 
-module.exports = function(request) {
-       return github(request, owner, repo).then(function(all) {
-               return all;
-       });
+module.exports = function (request) {
+  return github(request, owner, repo).then(function (all) {
+    return all;
+  });
 };
 
 if (module === require.main) {
-       module.exports(require('@root/request')).then(function(all) {
-               all = require('../_webi/normalize.js')(all);
-               all.releases = all.releases.slice(0, 5);
-               console.info(JSON.stringify(all, null, 2));
-       });
+  module.exports(require('@root/request')).then(function (all) {
+    all = require('../_webi/normalize.js')(all);
+    all.releases = all.releases.slice(0, 5);
+    console.info(JSON.stringify(all, null, 2));
+  });
 }