Skip to content

Commit

Permalink
chore(api.js): better platform-specific notes (#2253)
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir authored Jul 21, 2021
1 parent f130a16 commit 7858658
Show file tree
Hide file tree
Showing 15 changed files with 111 additions and 111 deletions.
2 changes: 1 addition & 1 deletion tooling/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Get application metadata.
*
* This package is also accessible with `window.__TAURI__.app` when `tauri.conf.json > build > withGlobalTauri` is set to true.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Parse arguments from your Command Line Interface.
*
* This package is also accessible with `window.__TAURI__.cli` when `tauri.conf.json > build > withGlobalTauri` is set to true.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Read and write to the system clipboard.
*
* This package is also accessible with `window.__TAURI__.clipboard` when `tauri.conf.json > build > withGlobalTauri` is set to true.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* The event system allows you to emit events to the backend and listen to events from it.
*
* This package is also accessible with `window.__TAURI__.event` when `tauri.conf.json > build > withGlobalTauri` is set to true.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/globalShortcut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @packageDocumentation
* @module
*/

import { invokeTauriCommand } from './helpers/tauri'
Expand Down
194 changes: 97 additions & 97 deletions tooling/api/src/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { BaseDirectory } from './fs'
* }
* ```
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
* @packageDocumentation
* @module
*/

/**
Expand All @@ -46,12 +46,12 @@ async function appDir(): Promise<string> {

/**
* Returns the path to the user's audio directory.
* # Linux
* Resolves to `$XDG_MUSIC_DIR`.
* # macOS
* Resolves to `$HOME/Music`.
* # Windows
* Resolves to `{FOLDERID_Music}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_MUSIC_DIR`.
* - **macOS:** Resolves to `$HOME/Music`.
* - **Windows:** Resolves to `{FOLDERID_Music}`.
*
* @returns
*/
Expand All @@ -68,12 +68,12 @@ async function audioDir(): Promise<string> {

/**
* Returns the path to the user's cache directory.
* # Linux
* Resolves to `$XDG_CACHE_HOME` or `$HOME/.cache`.
* # macOS
* Resolves to `$HOME/Library/Caches`.
* # Windows
* Resolves to `{FOLDERID_LocalAppData}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_CACHE_HOME` or `$HOME/.cache`.
* - **macOS:** Resolves to `$HOME/Library/Caches`.
* - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
*
* @returns
*/
Expand All @@ -90,12 +90,12 @@ async function cacheDir(): Promise<string> {

/**
* Returns the path to the user's config directory.
* # Linux
* Resolves to `$XDG_CONFIG_HOME` or `$HOME/.config`.
* # macOS
* Resolves to `$HOME/Library/Application Support`.
* # Windows
* Resolves to `{FOLDERID_LocalAppData}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_CONFIG_HOME` or `$HOME/.config`.
* - **macOS:** Resolves to `$HOME/Library/Application Support`.
* - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
*
* @returns
*/
Expand All @@ -112,12 +112,12 @@ async function configDir(): Promise<string> {

/**
* Returns the path to the user's data directory.
* # Linux
* Resolves to `$XDG_DATA_HOME` or `$HOME/.local/share`.
* # macOS
* Resolves to `$HOME/Library/Application Support`.
* # Windows
* Resolves to `{FOLDERID_RoamingAppData}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_DATA_HOME` or `$HOME/.local/share`.
* - **macOS:** Resolves to `$HOME/Library/Application Support`.
* - **Windows:** Resolves to `{FOLDERID_RoamingAppData}`.
*
* @returns
*/
Expand All @@ -134,12 +134,12 @@ async function dataDir(): Promise<string> {

/**
* Returns the path to the user's desktop directory.
* # Linux
* Resolves to `$XDG_DESKTOP_DIR`.
* # macOS
* Resolves to `$HOME/Library/Desktop`.
* # Windows
* Resolves to `{FOLDERID_Desktop}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_DESKTOP_DIR`.
* - **macOS:** Resolves to `$HOME/Library/Desktop`.
* - **Windows:** Resolves to `{FOLDERID_Desktop}`.
* @returns
*/
Expand All @@ -156,12 +156,12 @@ async function desktopDir(): Promise<string> {

/**
* Returns the path to the user's document directory.
* # Linux
* Resolves to `$XDG_DOCUMENTS_DIR`.
* # macOS
* Resolves to `$HOME/Documents`.
* # Windows
* Resolves to `{FOLDERID_Documents}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_DOCUMENTS_DIR`.
* - **macOS:** Resolves to `$HOME/Documents`.
* - **Windows:** Resolves to `{FOLDERID_Documents}`.
*
* @returns
*/
Expand All @@ -178,12 +178,12 @@ async function documentDir(): Promise<string> {

/**
* Returns the path to the user's download directory.
* # Linux
* Resolves to `$XDG_DOWNLOAD_DIR`.
* # macOS
* Resolves to `$HOME/Downloads`.
* # Windows
* Resolves to `{FOLDERID_Downloads}`.
*
* ## Platform-specific
*
* - **Linux**: Resolves to `$XDG_DOWNLOAD_DIR`.
* - **macOS**: Resolves to `$HOME/Downloads`.
* - **Windows**: Resolves to `{FOLDERID_Downloads}`.
*
* @returns
*/
Expand All @@ -200,12 +200,12 @@ async function downloadDir(): Promise<string> {

/**
* Returns the path to the user's executable directory.
* # Linux
* Resolves to `$XDG_BIN_HOME/../bin` or `$XDG_DATA_HOME/../bin` or `$HOME/.local/bin`.
* # macOS
* Not supported.
* # Windows
* Not supported.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_BIN_HOME/../bin` or `$XDG_DATA_HOME/../bin` or `$HOME/.local/bin`.
* - **macOS:** Not supported.
* - **Windows:** Not supported.
*
* @returns
*/
Expand All @@ -222,12 +222,12 @@ async function executableDir(): Promise<string> {

/**
* Returns the path to the user's font directory.
* # Linux
* Resolves to `$XDG_DATA_HOME/fonts` or `$HOME/.local/share/fonts`.
* # macOS
* Resolves to `$HOME/Library/Fonts`.
* # Windows
* Not supported.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_DATA_HOME/fonts` or `$HOME/.local/share/fonts`.
* - **macOS:** Resolves to `$HOME/Library/Fonts`.
* - **Windows:** Not supported.
*
* @returns
*/
Expand All @@ -244,12 +244,12 @@ async function fontDir(): Promise<string> {

/**
* Returns the path to the user's home directory.
* # Linux
* Resolves to `$HOME`.
* # macOS
* Resolves to `$HOME`.
* # Windows
* Resolves to `{FOLDERID_Profile}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$HOME`.
* - **macOS:** Resolves to `$HOME`.
* - **Windows:** Resolves to `{FOLDERID_Profile}`.
*
* @returns
*/
Expand All @@ -266,12 +266,12 @@ async function homeDir(): Promise<string> {

/**
* Returns the path to the user's local data directory.
* # Linux
* Resolves to `$XDG_DATA_HOME` or `$HOME/.local/share`.
* # macOS
* Resolves to `$HOME/Library/Application Support`.
* # Windows
* Resolves to `{FOLDERID_LocalAppData}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_DATA_HOME` or `$HOME/.local/share`.
* - **macOS:** Resolves to `$HOME/Library/Application Support`.
* - **Windows:** Resolves to `{FOLDERID_LocalAppData}`.
*
* @returns
*/
Expand All @@ -288,12 +288,12 @@ async function localDataDir(): Promise<string> {

/**
* Returns the path to the user's picture directory.
* # Linux
* Resolves to `$XDG_PICTURES_DIR`.
* # macOS
* Resolves to `$HOME/Pictures`.
* # Windows
* Resolves to `{FOLDERID_Pictures}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_PICTURES_DIR`.
* - **macOS:** Resolves to `$HOME/Pictures`.
* - **Windows:** Resolves to `{FOLDERID_Pictures}`.
*
* @returns
*/
Expand All @@ -310,12 +310,12 @@ async function pictureDir(): Promise<string> {

/**
* Returns the path to the user's public directory.
* # Linux
* Resolves to `$XDG_PUBLICSHARE_DIR`.
* # macOS
* Resolves to `$HOME/Public`.
* # Windows
* Resolves to `{FOLDERID_Public}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_PUBLICSHARE_DIR`.
* - **macOS:** Resolves to `$HOME/Public`.
* - **Windows:** Resolves to `{FOLDERID_Public}`.
*
* @returns
*/
Expand Down Expand Up @@ -348,12 +348,12 @@ async function resourceDir(): Promise<string> {

/**
* Returns the path to the user's runtime directory.
* # Linux
* Resolves to `$XDG_RUNTIME_DIR`.
* # macOS
* Not supported.
* # Windows
* Not supported.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_RUNTIME_DIR`.
* - **macOS:** Not supported.
* - **Windows:** Not supported.
*
* @returns
*/
Expand All @@ -370,12 +370,12 @@ async function runtimeDir(): Promise<string> {

/**
* Returns the path to the user's template directory.
* # Linux
* Resolves to `$XDG_TEMPLATES_DIR`.
* # macOS
* Not supported.
* # Windows
* Resolves to `{FOLDERID_Templates}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_TEMPLATES_DIR`.
* - **macOS:** Not supported.
* - **Windows:** Resolves to `{FOLDERID_Templates}`.
*
* @returns
*/
Expand All @@ -392,12 +392,12 @@ async function templateDir(): Promise<string> {

/**
* Returns the path to the user's video directory.
* # Linux
* Resolves to `$XDG_VIDEOS_DIR`.
* # macOS
* Resolves to `$HOME/Movies`.
* # Windows
* Resolves to `{FOLDERID_Videos}`.
*
* ## Platform-specific
*
* - **Linux:** Resolves to `$XDG_VIDEOS_DIR`.
* - **macOS:** Resolves to `$HOME/Movies`.
* - **Windows:** Resolves to `{FOLDERID_Videos}`.
*
* @returns
*/
Expand Down
Loading

0 comments on commit 7858658

Please sign in to comment.