9053c83e68921f35debd4804d99dbf12eb73d10d
[webi-installers/.git] / prettier / install.sh
1 # title: Prettier
2 # homepage: https://prettier.io/
3 # tagline: |
4 #   Prettier is an opinionated code formatter.
5 # description: |
6 #   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.
7 # examples: |
8 #   Prettify all web files in a project, recursively:
9 #   
10 #   ```bash
11 #   prettier --write '**/*{.md,.js,.html,.css}' --ignore ./dist
12 #   ```
13 #   
14 #   Tell Prettier which files to ignore every time
15 #   
16 #   ```bash
17 #   echo "./dist" >> .prettierignore
18 #   ```
19 #   
20 #   Tell Prettier which settings to use - do NOT use `package.json` when it's not necessary!
21 #   
22 #   **`.prettierrc`**:
23 #   
24 #   ```bash
25 #   {
26 #     "trailingComma": "none",
27 #     "tabWidth": 2,
28 #     "singleQuote": true,
29 #     "proseWrap": "always"
30 #   }
31 #   ```
32 #
33
34 if [ -z "$(npm --version 2>/dev/null)" ]; then
35     webi node
36     export PATH="$HOME/.local/opt/node/bin:$PATH"
37 fi
38 npm install -g prettier@latest