update prettier docs
authorAJ ONeal <aj@therootcompany.com>
Tue, 16 Jun 2020 23:16:52 +0000 (23:16 +0000)
committerAJ ONeal <aj@therootcompany.com>
Tue, 16 Jun 2020 23:16:52 +0000 (23:16 +0000)
_webi/releases.js
prettier/install.sh [new file with mode: 0644]

index ee0815d5a7d0e04466d6198c2a3fb5b170d39653..d85b9c54ab37001a819b3b5bd82d1fcda0cd2076 100644 (file)
@@ -140,7 +140,10 @@ Releases.renderBatch = function (
         .readFile(path.join(__dirname, 'template.bat'), 'utf8')
         .then(function (tplTxt) {
           return tplTxt
-            .replace(/^(REM )?WEBI_PKG=.*/im, "WEBI_PKG='" + pkg + '@' + ver + "'")
+            .replace(
+              /^(REM )?WEBI_PKG=.*/im,
+              "WEBI_PKG='" + pkg + '@' + ver + "'"
+            )
             .replace(/{{ installer }}/, installTxt);
         });
     });
diff --git a/prettier/install.sh b/prettier/install.sh
new file mode 100644 (file)
index 0000000..e6b987a
--- /dev/null
@@ -0,0 +1,37 @@
+# title: Prettier
+# homepage: https://prettier.io/
+# tagline: Prettier is an opinionated code formatter.
+# description: |
+#   The core value of Prettier is not in what it gives, but in what it takes away: countless hours of bikeshedding over code style choices. Also, it makes git merges much nicer.
+# examples: |
+#   Prettify all web files in a project, recursively:
+#   
+#   ```bash
+#   prettier --write '**/*{.md,.js,.html,.css}' --ignore ./dist
+#   ```
+#   
+#   Tell Prettier which files to ignore every time
+#   
+#   ```bash
+#   echo "./dist" >> .prettierignore
+#   ```
+#   
+#   Tell Prettier which settings to use - do NOT use `package.json` when it's not necessary!
+#   
+#   **`.prettierrc`**:
+#   
+#   ```bash
+#   {
+#     "trailingComma": "none",
+#     "tabWidth": 2,
+#     "singleQuote": true,
+#     "proseWrap": "always"
+#   }
+#   ```
+#
+
+if [ -z "$(npm --version 2>/dev/null)" ]; then
+    webi node
+    export PATH="$HOME/.local/opt/node/bin:$PATH"
+fi
+npm install -g prettier@latest