init
This commit is contained in:
commit
42ef2f9674
468 files changed
+645161
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
'use strict'
|
||||
|
||||
let Container = require('./container')
|
||||
|
||||
class AtRule extends Container {
|
||||
constructor(defaults) {
|
||||
super(defaults)
|
||||
this.type = 'atrule'
|
||||
}
|
||||
|
||||
append(...children) {
|
||||
if (!this.proxyOf.nodes) this.nodes = []
|
||||
return super.append(...children)
|
||||
}
|
||||
|
||||
prepend(...children) {
|
||||
if (!this.proxyOf.nodes) this.nodes = []
|
||||
return super.prepend(...children)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AtRule
|
||||
AtRule.default = AtRule
|
||||
|
||||
Container.registerAtRule(AtRule)
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
import { PluginListener } from './core';
|
||||
import { Image } from './image';
|
||||
import { Theme } from './window';
|
||||
/**
|
||||
* Identifier type used for data stores on macOS and iOS.
|
||||
*
|
||||
* Represents a 128-bit identifier, commonly expressed as a 16-byte UUID.
|
||||
*/
|
||||
export type DataStoreIdentifier = [
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number,
|
||||
number
|
||||
];
|
||||
/**
|
||||
* Bundle type of the current application.
|
||||
*/
|
||||
export declare enum BundleType {
|
||||
/** Windows NSIS */
|
||||
Nsis = "nsis",
|
||||
/** Windows MSI */
|
||||
Msi = "msi",
|
||||
/** Linux Debian package */
|
||||
Deb = "deb",
|
||||
/** Linux RPM */
|
||||
Rpm = "rpm",
|
||||
/** Linux AppImage */
|
||||
AppImage = "appimage",
|
||||
/** macOS app bundle */
|
||||
App = "app"
|
||||
}
|
||||
/**
|
||||
* Application metadata and related APIs.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
/**
|
||||
* Gets the application version.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getVersion } from '@tauri-apps/api/app';
|
||||
* const appVersion = await getVersion();
|
||||
* ```
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
declare function getVersion(): Promise<string>;
|
||||
/**
|
||||
* Gets the application name.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getName } from '@tauri-apps/api/app';
|
||||
* const appName = await getName();
|
||||
* ```
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
declare function getName(): Promise<string>;
|
||||
/**
|
||||
* Gets the Tauri framework version used by this application.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getTauriVersion } from '@tauri-apps/api/app';
|
||||
* const tauriVersion = await getTauriVersion();
|
||||
* ```
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
declare function getTauriVersion(): Promise<string>;
|
||||
/**
|
||||
* Gets the application identifier.
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getIdentifier } from '@tauri-apps/api/app';
|
||||
* const identifier = await getIdentifier();
|
||||
* ```
|
||||
*
|
||||
* @returns The application identifier as configured in `tauri.conf.json`.
|
||||
*
|
||||
* @since 2.4.0
|
||||
*/
|
||||
declare function getIdentifier(): Promise<string>;
|
||||
/**
|
||||
* Shows the application on macOS. This function does not automatically
|
||||
* focus any specific app window.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { show } from '@tauri-apps/api/app';
|
||||
* await show();
|
||||
* ```
|
||||
*
|
||||
* @since 1.2.0
|
||||
*/
|
||||
declare function show(): Promise<void>;
|
||||
/**
|
||||
* Hides the application on macOS.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { hide } from '@tauri-apps/api/app';
|
||||
* await hide();
|
||||
* ```
|
||||
*
|
||||
* @since 1.2.0
|
||||
*/
|
||||
declare function hide(): Promise<void>;
|
||||
/**
|
||||
* Fetches the data store identifiers on macOS and iOS.
|
||||
*
|
||||
* See https://developer.apple.com/documentation/webkit/wkwebsitedatastore for more information.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { fetchDataStoreIdentifiers } from '@tauri-apps/api/app';
|
||||
* const ids = await fetchDataStoreIdentifiers();
|
||||
* ```
|
||||
*
|
||||
* @since 2.4.0
|
||||
*/
|
||||
declare function fetchDataStoreIdentifiers(): Promise<DataStoreIdentifier[]>;
|
||||
/**
|
||||
* Removes the data store with the given identifier.
|
||||
*
|
||||
* Note that any webview using this data store should be closed before running this API.
|
||||
*
|
||||
* See https://developer.apple.com/documentation/webkit/wkwebsitedatastore for more information.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { fetchDataStoreIdentifiers, removeDataStore } from '@tauri-apps/api/app';
|
||||
* for (const id of (await fetchDataStoreIdentifiers())) {
|
||||
* await removeDataStore(id);
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @since 2.4.0
|
||||
*/
|
||||
declare function removeDataStore(uuid: DataStoreIdentifier): Promise<void>;
|
||||
/**
|
||||
* Gets the default window icon.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { defaultWindowIcon } from '@tauri-apps/api/app';
|
||||
* const icon = await defaultWindowIcon();
|
||||
* ```
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
declare function defaultWindowIcon(): Promise<Image | null>;
|
||||
/**
|
||||
* Sets the application's theme. Pass in `null` or `undefined` to follow
|
||||
* the system theme.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { setTheme } from '@tauri-apps/api/app';
|
||||
* await setTheme('dark');
|
||||
* ```
|
||||
*
|
||||
* #### Platform-specific
|
||||
*
|
||||
* - **iOS / Android:** Unsupported.
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
declare function setTheme(theme?: Theme | null): Promise<void>;
|
||||
/**
|
||||
* Sets the dock visibility for the application on macOS.
|
||||
*
|
||||
* @param visible - Whether the dock should be visible or not.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { setDockVisibility } from '@tauri-apps/api/app';
|
||||
* await setDockVisibility(false);
|
||||
* ```
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
declare function setDockVisibility(visible: boolean): Promise<void>;
|
||||
/**
|
||||
* Gets the application bundle type.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { getBundleType } from '@tauri-apps/api/app';
|
||||
* const type = await getBundleType();
|
||||
* ```
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
declare function getBundleType(): Promise<BundleType>;
|
||||
/**
|
||||
* Payload for the onBackButtonPress event.
|
||||
*/
|
||||
type OnBackButtonPressPayload = {
|
||||
/** Whether the webview canGoBack property is true. */
|
||||
canGoBack: boolean;
|
||||
};
|
||||
/**
|
||||
* Listens to the backButton event on Android.
|
||||
* @param handler
|
||||
*/
|
||||
declare function onBackButtonPress(handler: (payload: OnBackButtonPressPayload) => void): Promise<PluginListener>;
|
||||
declare function supportsMultipleWindows(): Promise<boolean>;
|
||||
export { getName, getVersion, getTauriVersion, getIdentifier, show, hide, defaultWindowIcon, setTheme, fetchDataStoreIdentifiers, removeDataStore, setDockVisibility, getBundleType, type OnBackButtonPressPayload, onBackButtonPress, supportsMultipleWindows };
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
# @tauri-apps/cli
|
||||
|
||||
<img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/.github/icon.png" height="128" width="128">
|
||||
|
||||
[](https://github.com/tauri-apps/tauri/tree/dev)
|
||||
[](https://opencollective.com/tauri)
|
||||
[](https://github.com/tauri-apps/tauri/actions/workflows/test-cli-js.yml)
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Ftauri-apps%2Ftauri?ref=badge_shield)
|
||||
[](https://discord.gg/SpmNs4S)
|
||||
[](https://tauri.app)
|
||||
[](https://good-labs.github.io/greater-good-affirmation)
|
||||
[](https://opencollective.com/tauri)
|
||||
|
||||
| Component | Version |
|
||||
| --------------- | ----------------------------------------------------- |
|
||||
| @tauri-apps/cli |  |
|
||||
|
||||
## About Tauri
|
||||
|
||||
Tauri is a polyglot and generic system that is very composable and allows engineers to make a wide variety of applications. It is used for building applications for Desktop Computers using a combination of Rust tools and HTML rendered in a Webview. Apps built with Tauri can ship with any number of pieces of an optional JS API / Rust API so that webviews can control the system via message passing. In fact, developers can extend the default API with their own functionality and bridge the Webview and Rust-based backend easily.
|
||||
|
||||
Tauri apps can have custom menus and have tray-type interfaces. They can be updated, and are managed by the user's operating system as expected. They are very small, because they use the system's webview. They do not ship a runtime, since the final binary is compiled from rust. This makes the reversing of Tauri apps not a trivial task.
|
||||
|
||||
## This module
|
||||
|
||||
Written in Typescript and packaged such that it can be used with `npm`, `pnpm`, `yarn`, and `bun`, this library provides a node.js runner for common tasks when using Tauri, like `pnpm tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/crates/tauri-cli).
|
||||
|
||||
To learn more about the details of how all of these pieces fit together, please consult this [ARCHITECTURE.md](https://github.com/tauri-apps/tauri/blob/dev/ARCHITECTURE.md) document.
|
||||
|
||||
## Installation
|
||||
|
||||
The preferred method is to install this module locally as a development dependency:
|
||||
|
||||
```
|
||||
$ pnpm add -D @tauri-apps/cli
|
||||
$ yarn add -D @tauri-apps/cli
|
||||
$ npm add -D @tauri-apps/cli
|
||||
```
|
||||
|
||||
## Semver
|
||||
|
||||
**tauri** is following [Semantic Versioning 2.0](https://semver.org/).
|
||||
|
||||
## Licenses
|
||||
|
||||
Code: (c) 2019 - 2021 - The Tauri Programme within The Commons Conservancy.
|
||||
|
||||
MIT or MIT/Apache 2.0 where applicable.
|
||||
|
||||
Logo: CC-BY-NC-ND
|
||||
|
||||
- Original Tauri Logo Designs by [Daniel Thompson-Yvetot](https://github.com/nothingismagick) and [Guillaume Chau](https://github.com/akryum)
|
||||
Reference in new issue
Block a user