mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 07:55:34 +03:00
chore: add prettierignore and fmt the repo (#5192)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
parent
ecb489a77c
commit
1d7171a1ec
11
.prettierignore
Normal file
11
.prettierignore
Normal file
@ -0,0 +1,11 @@
|
||||
/.github
|
||||
/.husky
|
||||
/.vscode
|
||||
/audits
|
||||
node_modules
|
||||
target
|
||||
dist
|
||||
/core/tauri/scripts
|
||||
/tooling/cli/templates
|
||||
/tooling/cli/node
|
||||
/tooling/cli/schema.json
|
@ -10,26 +10,26 @@ we should look to find a more "rusty way" to import / "pin" a version value in o
|
||||
rust binaries.
|
||||
*/
|
||||
|
||||
const {
|
||||
readFileSync,
|
||||
writeFileSync
|
||||
} = require('fs')
|
||||
const { readFileSync, writeFileSync } = require('fs')
|
||||
|
||||
const packageNickname = process.argv[2]
|
||||
const filePath = packageNickname === 'cli.js' ? `../../../tooling/cli/metadata.json` : `../../tooling/cli/metadata.json`
|
||||
const filePath =
|
||||
packageNickname === 'cli.js'
|
||||
? `../../../tooling/cli/metadata.json`
|
||||
: `../../tooling/cli/metadata.json`
|
||||
const bump = process.argv[3]
|
||||
let index = null
|
||||
|
||||
switch (bump) {
|
||||
case 'major':
|
||||
index = 0;
|
||||
break;
|
||||
index = 0
|
||||
break
|
||||
case 'minor':
|
||||
index = 1;
|
||||
break;
|
||||
index = 1
|
||||
break
|
||||
case 'patch':
|
||||
index = 2;
|
||||
break;
|
||||
index = 2
|
||||
break
|
||||
default:
|
||||
throw new Error('unexpected bump ' + bump)
|
||||
}
|
||||
|
@ -30,9 +30,7 @@
|
||||
"active": true,
|
||||
"dialog": false,
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK",
|
||||
"endpoints": [
|
||||
"http://localhost:3007"
|
||||
],
|
||||
"endpoints": ["http://localhost:3007"],
|
||||
"windows": {
|
||||
"installMode": "quiet"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta charset="UTF-8" />
|
||||
<title>Isolation Secure Script</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
#response {
|
||||
@ -52,7 +51,9 @@
|
||||
var createWindowButton = document.createElement('button')
|
||||
createWindowButton.innerHTML = 'Create window'
|
||||
createWindowButton.addEventListener('click', function () {
|
||||
var webviewWindow = new WebviewWindow(Math.random().toString().replace('.', ''))
|
||||
var webviewWindow = new WebviewWindow(
|
||||
Math.random().toString().replace('.', '')
|
||||
)
|
||||
webviewWindow.once('tauri://created', function () {
|
||||
responseContainer.innerHTML += 'Created new webview'
|
||||
})
|
||||
@ -80,5 +81,4 @@
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
@ -17,5 +16,4 @@
|
||||
</script>
|
||||
<script src="secondary.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
#response {
|
||||
@ -43,12 +42,13 @@
|
||||
var windowNumber = 1
|
||||
createWindowButton.innerHTML = 'Create child window ' + windowNumber
|
||||
createWindowButton.addEventListener('click', function () {
|
||||
runCommand('create_child_window', { id: `child-${windowId}-${windowNumber}` })
|
||||
runCommand('create_child_window', {
|
||||
id: `child-${windowId}-${windowNumber}`
|
||||
})
|
||||
windowNumber += 1
|
||||
createWindowButton.innerHTML = 'Create child window ' + windowNumber
|
||||
})
|
||||
container.appendChild(createWindowButton)
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
@ -36,14 +35,22 @@
|
||||
const frontendDiv = document.getElementById('frontend')
|
||||
const { Command } = window.__TAURI__.shell
|
||||
const command = Command.sidecar('binaries/app')
|
||||
command.on('close', data => {
|
||||
addMessage(frontendDiv, `command finished with code ${data.code} and signal ${data.signal}`)
|
||||
command.on('close', (data) => {
|
||||
addMessage(
|
||||
frontendDiv,
|
||||
`command finished with code ${data.code} and signal ${data.signal}`
|
||||
)
|
||||
})
|
||||
command.on('error', error => addMessage(frontendDiv, `command error: "${error}"`))
|
||||
command.stdout.on('data', line => addMessage(frontendDiv, `command stdout: "${line}"`))
|
||||
command.stderr.on('data', line => addMessage(frontendDiv, `command stderr: "${line}"`))
|
||||
command.on('error', (error) =>
|
||||
addMessage(frontendDiv, `command error: "${error}"`)
|
||||
)
|
||||
command.stdout.on('data', (line) =>
|
||||
addMessage(frontendDiv, `command stdout: "${line}"`)
|
||||
)
|
||||
command.stderr.on('data', (line) =>
|
||||
addMessage(frontendDiv, `command stderr: "${line}"`)
|
||||
)
|
||||
command.spawn()
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
@ -27,5 +26,4 @@
|
||||
video.load()
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -11,7 +11,7 @@
|
||||
"url": "https://github.com/tauri-apps/tauri.git"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore",
|
||||
"format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .prettierignore",
|
||||
"postinstall": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -16,8 +16,8 @@
|
||||
"npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly",
|
||||
"lint": "eslint --ext ts \"./src/**/*.ts\"",
|
||||
"lint-fix": "eslint --fix --ext ts \"./src/**/*.ts\"",
|
||||
"format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore",
|
||||
"format:check": "prettier --check --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore",
|
||||
"format": "prettier --write --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path ../../.prettierignore",
|
||||
"format:check": "prettier --check --end-of-line=auto \"./**/*.{cjs,js,jsx,ts,tsx,html,css,json}\" --ignore-path ../../.prettierignore",
|
||||
"generate-docs": "typedoc"
|
||||
},
|
||||
"repository": {
|
||||
|
Loading…
Reference in New Issue
Block a user