Skip to content

Commit

Permalink
tweak some more; awkward concept to explain simply
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotmoon committed May 27, 2024
1 parent 1fcda30 commit 9cac368
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions site/dev/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ Every package must include a [config dictionary](./config.md). PopClip will try
looking in the root of the package directory for a file with base name `Config`
(case sensitive). The file is interpreted according to its extension:

| File Name | Format | Interpretation |
| ----------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `Config.plist` | Plist | An Apple [XML Property List](https://en.wikipedia.org/wiki/Property_list) file. |
| `Config.json` | JSON | A [JSON](https://www.json.org/json-en.html) file. |
| `Config.yaml` | YAML | A [YAML 1.2](https://yaml.org) file. |
| `Config.js`, `Config.ts` | JavaScript, TypeScript | [JavaScript or TypeScript module](./js-modules.md) with [snippet header](./snippets#inverted-syntax). |
| `Config.applescript` | AppleScript | AppleScript with [snippet header](./snippets#inverted-syntax). |
| `Config.<anything else>` or just `Config` | Snippet | Shell script with [snippet header](./snippets#inverted-syntax). |
| File Name | Format | Interpretation |
| ----------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Config.plist` | Plist | An Apple [XML Property List](https://en.wikipedia.org/wiki/Property_list) file. |
| `Config.json` | JSON | A [JSON](https://www.json.org/json-en.html) file. |
| `Config.yaml` | YAML | A [YAML 1.2](https://yaml.org) file. |
| `Config.js`, `Config.ts` | JavaScript, TypeScript | [JavaScript or TypeScript module](./js-modules.md) with [snippet header](./snippets#inverted-syntax). _It is automatically interpreted as a module when both `language` and `module` are omitted from the header._ |
| `Config.applescript` | AppleScript | AppleScript with [snippet header](./snippets#inverted-syntax). |
| `Config.<anything else>` or just `Config` | Snippet | Shell script with [snippet header](./snippets#inverted-syntax). |

::: info Historical note

Expand Down
12 changes: 6 additions & 6 deletions site/dev/snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ features of your text editor.
When using the inverted syntax, the whole snippet text will be interpreted as if
it was a file specified in the root of the config, as follows:

| To intepret as... | Include these fields... |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shell script file` | Specify `interpreter` string. |
| `applescript file` | Specify `language: applescript`. |
| `javascript file` | Specify `language: javascript` or `language: typescript` and omit `module` field. |
| `module` | Specify `language: javascript` or `language: typescript` with `module: true`. _Special case: In a package, if the config file is called `Config.js` or `Config.ts`, it is automatically interpreted as a module when both `language` and `module` are omitted._ |
| To intepret as... | Include these fields... |
| ------------------- | --------------------------------------------------------------------------------- |
| `shell script file` | Specify `interpreter` string. |
| `applescript file` | Specify `language: applescript`. |
| `javascript file` | Specify `language: javascript` or `language: typescript` and omit `module` field. |
| `module` | Specify `language: javascript` or `language: typescript` with `module: true`.<br> |

### Inverted syntax examples

Expand Down

0 comments on commit 9cac368

Please sign in to comment.