mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-19 04:08:45 +03:00
format files
This commit is contained in:
parent
f2121dcbfc
commit
6c3d8790cb
1
.husky/.gitignore
vendored
1
.husky/.gitignore
vendored
@ -1 +0,0 @@
|
||||
_
|
@ -1,17 +1,37 @@
|
||||
/.changes
|
||||
/.github
|
||||
/.husky
|
||||
/.vscode
|
||||
/audits
|
||||
node_modules
|
||||
target
|
||||
dist
|
||||
/core/tauri/scripts/bundle.global.js
|
||||
/tooling/cli/templates
|
||||
/tooling/cli/node
|
||||
/tooling/cli/schema.json
|
||||
/core/tauri-config-schema/schema.json
|
||||
/.vscode
|
||||
|
||||
# dependcies and artifacts directories
|
||||
node_modules/
|
||||
target/
|
||||
dist/
|
||||
|
||||
# lock files
|
||||
pnpm-lock.yaml
|
||||
|
||||
# autogenerated and minimized js file
|
||||
core/tauri/scripts/bundle.global.js
|
||||
|
||||
# this file is an IIFE, shouldn't be formatted
|
||||
core/tauri/scripts/process-ipc-message-fn.js
|
||||
|
||||
# cli templates should be formatted manually
|
||||
# it also includes invalid json files that
|
||||
# prettier can't handle
|
||||
tooling/cli/templates
|
||||
|
||||
# autogenerated files
|
||||
**/autogenerated/**/*.md
|
||||
tooling/cli/node/index.js
|
||||
tooling/cli/node/index.d.ts
|
||||
CHANGELOG.md
|
||||
*.wxs
|
||||
**/reference.md
|
||||
*schema.json
|
||||
core/tauri/scripts/process-ipc-message-fn.js
|
||||
|
||||
# WiX templates
|
||||
*.wxs
|
||||
|
||||
# examples /gen directory
|
||||
examples/**/src-tauri/gen
|
||||
|
14
README.md
14
README.md
@ -43,13 +43,13 @@ The list of Tauri's features includes, but is not limited to:
|
||||
|
||||
Tauri currently supports development and distribution on the following platforms:
|
||||
|
||||
| Platform | Versions |
|
||||
| :----------------- | :-------------------------------------------------------------------------------------------------------------- |
|
||||
| Windows | 7 and above |
|
||||
| macOS | 10.15 and above |
|
||||
| Linux | webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04). |
|
||||
| iOS/iPadOS (beta) | 9 and above |
|
||||
| Android (beta) | 7 and above |
|
||||
| Platform | Versions |
|
||||
| :---------------- | :-------------------------------------------------------------------------------------------------------------- |
|
||||
| Windows | 7 and above |
|
||||
| macOS | 10.15 and above |
|
||||
| Linux | webkit2gtk 4.0 for Tauri v1 (for example Ubuntu 18.04). webkit2gtk 4.1 for Tauri v2 (for example Ubuntu 22.04). |
|
||||
| iOS/iPadOS (beta) | 9 and above |
|
||||
| Android (beta) | 7 and above |
|
||||
|
||||
## Contributing
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en" theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -2,9 +2,7 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "secondary-window",
|
||||
"description": "capability for secondary window",
|
||||
"windows": [
|
||||
"main-*"
|
||||
],
|
||||
"windows": ["main-*"],
|
||||
"permissions": [
|
||||
{
|
||||
"identifier": "sample:allow-ping",
|
||||
|
@ -2,10 +2,7 @@
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "run-app",
|
||||
"description": "permissions to run the app",
|
||||
"windows": [
|
||||
"main",
|
||||
"main-*"
|
||||
],
|
||||
"windows": ["main", "main-*"],
|
||||
"permissions": [
|
||||
{
|
||||
"identifier": "allow-log-operation",
|
||||
@ -62,4 +59,4 @@
|
||||
"core:webview:allow-create-webview-window",
|
||||
"core:webview:allow-print"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,11 +1,6 @@
|
||||
{
|
||||
"$schema": "../gen/schemas/desktop-schema.json",
|
||||
"identifier": "app",
|
||||
"permissions": [
|
||||
"core:event:default",
|
||||
"core:window:default"
|
||||
],
|
||||
"windows": [
|
||||
"main"
|
||||
]
|
||||
}
|
||||
"permissions": ["core:event:default", "core:window:default"],
|
||||
"windows": ["main"]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -1,4 +1,5 @@
|
||||
# @tauri-apps/cli
|
||||
|
||||
<img align="right" src="https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" height="128" width="128">
|
||||
|
||||
[![status](https://img.shields.io/badge/status-stable-blue.svg)](https://github.com/tauri-apps/tauri/tree/dev)
|
||||
@ -10,23 +11,26 @@
|
||||
[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
|
||||
[![support](https://img.shields.io/badge/sponsor-Open%20Collective-blue.svg)](https://opencollective.com/tauri)
|
||||
|
||||
| Component | Version |
|
||||
| --------- | ------------------------------------------- |
|
||||
| @tauri-apps/cli | ![](https://img.shields.io/npm/v/@tauri-apps/cli.svg) |
|
||||
| Component | Version |
|
||||
| --------------- | ----------------------------------------------------- |
|
||||
| @tauri-apps/cli | ![](https://img.shields.io/npm/v/@tauri-apps/cli.svg) |
|
||||
|
||||
## 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/tooling/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
|
||||
@ -34,11 +38,15 @@ $ 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)
|
||||
|
6
tooling/cli/node/index.d.ts
vendored
6
tooling/cli/node/index.d.ts
vendored
@ -7,5 +7,9 @@
|
||||
|
||||
/* auto-generated by NAPI-RS */
|
||||
|
||||
export function run(args: Array<string>, binName: string | undefined | null, callback: (...args: any[]) => any): void
|
||||
export function run(
|
||||
args: Array<string>,
|
||||
binName: string | undefined | null,
|
||||
callback: (...args: any[]) => any
|
||||
): void
|
||||
export function logError(error: string): void
|
||||
|
@ -21,7 +21,10 @@ function isMusl() {
|
||||
// For Node 10
|
||||
if (!process.report || typeof process.report.getReport !== 'function') {
|
||||
try {
|
||||
const lddPath = require('child_process').execSync('which ldd').toString().trim()
|
||||
const lddPath = require('child_process')
|
||||
.execSync('which ldd')
|
||||
.toString()
|
||||
.trim()
|
||||
return readFileSync(lddPath, 'utf8').includes('musl')
|
||||
} catch (e) {
|
||||
return true
|
||||
@ -48,7 +51,9 @@ switch (platform) {
|
||||
}
|
||||
break
|
||||
case 'arm':
|
||||
localFileExisted = existsSync(join(__dirname, 'cli.android-arm-eabi.node'))
|
||||
localFileExisted = existsSync(
|
||||
join(__dirname, 'cli.android-arm-eabi.node')
|
||||
)
|
||||
try {
|
||||
if (localFileExisted) {
|
||||
nativeBinding = require('./cli.android-arm-eabi.node')
|
||||
@ -135,9 +140,7 @@ switch (platform) {
|
||||
}
|
||||
break
|
||||
case 'arm64':
|
||||
localFileExisted = existsSync(
|
||||
join(__dirname, 'cli.darwin-arm64.node')
|
||||
)
|
||||
localFileExisted = existsSync(join(__dirname, 'cli.darwin-arm64.node'))
|
||||
try {
|
||||
if (localFileExisted) {
|
||||
nativeBinding = require('./cli.darwin-arm64.node')
|
||||
|
5
tooling/cli/node/main.d.ts
vendored
5
tooling/cli/node/main.d.ts
vendored
@ -5,4 +5,7 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
export function run(args: Array<string>, binName: string | undefined | null): Promise<void>
|
||||
export function run(
|
||||
args: Array<string>,
|
||||
binName: string | undefined | null
|
||||
): Promise<void>
|
||||
|
@ -30,7 +30,15 @@ describe('[CLI] @tauri-apps/cli template', () => {
|
||||
await move(outPath, cacheOutPath)
|
||||
}
|
||||
|
||||
await cli.run(['init', '--directory', process.cwd(), '--force', '--tauri-path', resolve(currentDirName, '../../../../../..'), '--ci'])
|
||||
await cli.run([
|
||||
'init',
|
||||
'--directory',
|
||||
process.cwd(),
|
||||
'--force',
|
||||
'--tauri-path',
|
||||
resolve(currentDirName, '../../../../../..'),
|
||||
'--ci'
|
||||
])
|
||||
|
||||
if (outExists) {
|
||||
await move(cacheOutPath, outPath)
|
||||
|
@ -11,12 +11,7 @@ const warn = logger('app:spawn')
|
||||
/*
|
||||
Returns pid, takes onClose
|
||||
*/
|
||||
module.exports.spawn = (
|
||||
cmd,
|
||||
params,
|
||||
cwd,
|
||||
onClose
|
||||
) => {
|
||||
module.exports.spawn = (cmd, params, cwd, onClose) => {
|
||||
log(`Running "${cmd} ${params.join(' ')}"`)
|
||||
log()
|
||||
|
||||
@ -44,12 +39,7 @@ module.exports.spawn = (
|
||||
/*
|
||||
Returns nothing, takes onFail
|
||||
*/
|
||||
module.exports.spawnSync = (
|
||||
cmd,
|
||||
params,
|
||||
cwd,
|
||||
onFail
|
||||
) => {
|
||||
module.exports.spawnSync = (cmd, params, cwd, onFail) => {
|
||||
log(`[sync] Running "${cmd} ${params.join(' ')}"`)
|
||||
log()
|
||||
|
||||
|
@ -62,4 +62,4 @@
|
||||
"csp": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user