mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-19 04:08:45 +03:00
build: migrate repo to use pnpm
as the pacakge manager
This commit is contained in:
parent
39bf0a1635
commit
bc56061d2e
@ -81,16 +81,16 @@
|
||||
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
|
||||
"prepublish": [
|
||||
{
|
||||
"command": "yarn",
|
||||
"command": "pnpm i",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn audit",
|
||||
"command": "pnpm audit",
|
||||
"dryRunCommand": true,
|
||||
"runFromRoot": true,
|
||||
"pipe": true
|
||||
@ -108,12 +108,12 @@
|
||||
"publish": [
|
||||
"sleep 15s",
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn publish --access public --loglevel silly --tag next --provenance",
|
||||
"command": "pnpm publish --access public --loglevel silly --tag next --provenance",
|
||||
"dryRunCommand": "npm publish --dry-run --access public --provenance",
|
||||
"pipe": true
|
||||
},
|
||||
@ -142,16 +142,16 @@
|
||||
],
|
||||
"prepublish": [
|
||||
{
|
||||
"command": "yarn",
|
||||
"command": "pnpm",
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Audit</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Audit</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn audit",
|
||||
"command": "pnpm audit",
|
||||
"dryRunCommand": true,
|
||||
"runFromRoot": true,
|
||||
"pipe": true
|
||||
@ -162,18 +162,18 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn npm-pack",
|
||||
"command": "pnpm npm-pack",
|
||||
"dryRunCommand": true
|
||||
}
|
||||
],
|
||||
"publish": [
|
||||
{
|
||||
"command": "echo '<details>\n<summary><em><h4>Yarn Publish</h4></em></summary>\n\n```'",
|
||||
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "yarn npm-publish",
|
||||
"command": "pnpm npm-publish",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
|
@ -24,7 +24,7 @@ Prerequisites are mainly derived from VS Code's instructions for usage of develo
|
||||
|
||||
### A note on filesystem performance
|
||||
|
||||
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `yarn install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
|
||||
Due to limitations in how Docker shares files between the Docker host and a container, it's also recommended that developers [clone Tauri source code into a container volume](https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-clone-repository-in-container-volume). This is optional, but highly advised as many filesystem/IO heavy operations (`cargo build`, `pnpm install`, etc) will be very slow if they operate on directories shared with a Docker container from the Docker host.
|
||||
|
||||
To do this, open your project with VS Code and run **Remote-Containers: Clone Repository in Container Volume...** from the Command Palette (<kbd>F1</kbd>).
|
||||
|
||||
|
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
@ -48,7 +48,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut
|
||||
|
||||
First, [join our Discord server](https://discord.gg/SpmNs4S) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.
|
||||
|
||||
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [Yarn](https://yarnpkg.com/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
|
||||
To set up your machine for development, follow the [Tauri setup guide](https://tauri.app/v1/guides/getting-started/prerequisites/) to get all the tools you need to develop Tauri apps. The only additional tool you may need is [PNPM](https://pnpm.io/), it is only required if you are developing the Node CLI or API packages (`tooling/cli/node` and `tooling/api`). Next, fork and clone this repo. It is structured as a monorepo, which means that all the various Tauri packages are under the same repository. The development process varies depending on what part of Tauri you are contributing to, see the guides below for per-package instructions.
|
||||
|
||||
Some Tauri packages will be automatically built when running one of the examples. Others, however, will need to be built beforehand. To build these automatically, run the `.scripts/setup.sh` (Linux and macOS) or `.scripts/setup.ps1` (Windows) script. This will install the Rust and Node.js CLI and build the JS API. After that, you should be able to run all the examples. Note that the setup script should be executed from the root folder of the repository in order to run correctly.
|
||||
|
||||
@ -78,7 +78,7 @@ $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --open
|
||||
|
||||
### Developing the JS API
|
||||
|
||||
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `yarn build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
|
||||
The JS API provides bindings between the developer's JS in the Webview and the builtin Tauri APIs, written in Rust. Its code is located in `[Tauri repo root]/tooling/api`. After making changes to the code, run `pnpm build` to build it. To test your changes, we recommend using the API example app, located in `[Tauri repo root]/examples/api`. It will automatically use your local copy of the JS API and provides a helpful UI to test the various commands.
|
||||
|
||||
## Financial Contribution
|
||||
|
||||
|
11
.github/workflows/audit.yml
vendored
11
.github/workflows/audit.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
- '**/Cargo.lock'
|
||||
- '**/Cargo.toml'
|
||||
- '**/package.json'
|
||||
- '**/yarn.lock'
|
||||
- '**/pnpm-lock.yaml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
@ -34,11 +34,4 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: audit workspace
|
||||
run: yarn audit
|
||||
- name: audit @tauri-apps/api
|
||||
working-directory: tooling/api
|
||||
run: yarn audit
|
||||
- name: audit @tauri-apps/cli
|
||||
working-directory: tooling/cli/node
|
||||
run: yarn audit
|
||||
- run: pnpm audit
|
||||
|
2
.github/workflows/check-generated-files.yml
vendored
2
.github/workflows/check-generated-files.yml
vendored
@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
- name: build api
|
||||
working-directory: tooling/api
|
||||
run: yarn && yarn build
|
||||
run: pnpm i && pnpm build
|
||||
- name: check api
|
||||
run: ./.scripts/ci/has-diff.sh
|
||||
|
||||
|
@ -48,9 +48,9 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
cd ./tooling/cli/node
|
||||
yarn
|
||||
yarn build
|
||||
yarn test
|
||||
pnpm i
|
||||
pnpm build
|
||||
pnpm test
|
||||
|
||||
version-or-publish:
|
||||
runs-on: ubuntu-latest
|
||||
@ -74,8 +74,7 @@ jobs:
|
||||
with:
|
||||
node-version: 18
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/*/yarn.lock
|
||||
cache: pnpm
|
||||
|
||||
- name: cargo login
|
||||
run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }}
|
||||
|
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -112,9 +112,9 @@ jobs:
|
||||
- name: Test
|
||||
run: |
|
||||
cd tooling/api
|
||||
yarn && yarn build
|
||||
pnpm i && pnpm build
|
||||
cd ../../examples/api
|
||||
yarn
|
||||
pnpm i
|
||||
. .setup-cross.sh
|
||||
chmod +x cargo-tauri
|
||||
chmod +x $HOME/.cargo/bin/cross
|
||||
|
46
.github/workflows/lint-js.yml
vendored
46
.github/workflows/lint-js.yml
vendored
@ -16,45 +16,35 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
eslint-cli:
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/cli/node/yarn.lock
|
||||
- name: install deps via yarn
|
||||
working-directory: ./tooling/cli/node/
|
||||
run: yarn
|
||||
# nothing to lint
|
||||
#- name: run lint
|
||||
# working-directory: ./tooling/cli/node/
|
||||
# run: yarn lint
|
||||
- name: run format
|
||||
working-directory: ./tooling/cli/node/
|
||||
run: yarn format:check
|
||||
cache: pnpm
|
||||
- run: pnpm i
|
||||
- run: pnpm format:check
|
||||
|
||||
eslint-api:
|
||||
eslint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/api/yarn.lock
|
||||
cache: pnpm
|
||||
- run: pnpm i
|
||||
- run: pnpm eslint:check
|
||||
|
||||
- name: install deps via yarn
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn
|
||||
- name: run ts:check
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn ts:check
|
||||
- name: run lint
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn lint
|
||||
- name: run format
|
||||
working-directory: ./tooling/api/
|
||||
run: yarn format:check
|
||||
typescript:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: pnpm
|
||||
- run: pnpm i
|
||||
- run: pnpm ts:check
|
||||
|
69
.github/workflows/publish-cli-js.yml
vendored
69
.github/workflows/publish-cli-js.yml
vendored
@ -30,45 +30,45 @@ jobs:
|
||||
target: x86_64-apple-darwin
|
||||
architecture: x64
|
||||
build: |
|
||||
yarn build:release --target=x86_64-apple-darwin
|
||||
pnpm build:release --target=x86_64-apple-darwin
|
||||
strip -x *.node
|
||||
- host: windows-latest
|
||||
build: yarn build:release
|
||||
build: pnpm build:release
|
||||
target: x86_64-pc-windows-msvc
|
||||
architecture: x64
|
||||
- host: windows-latest
|
||||
build: yarn build:release --target i686-pc-windows-msvc
|
||||
build: pnpm build:release --target i686-pc-windows-msvc
|
||||
target: i686-pc-windows-msvc
|
||||
architecture: x64
|
||||
- host: windows-latest
|
||||
architecture: x64
|
||||
target: aarch64-pc-windows-msvc
|
||||
build: yarn build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
|
||||
build: pnpm build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
|
||||
- host: ubuntu-20.04
|
||||
target: x86_64-unknown-linux-gnu
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release --target x86_64-unknown-linux-gnu
|
||||
pnpm build:release --target x86_64-unknown-linux-gnu
|
||||
strip *.node
|
||||
- host: ubuntu-20.04
|
||||
target: x86_64-unknown-linux-musl
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release
|
||||
pnpm build:release
|
||||
strip *.node
|
||||
- host: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
build: |
|
||||
yarn build:release --features native-tls-vendored --target=aarch64-apple-darwin
|
||||
pnpm build:release --features native-tls-vendored --target=aarch64-apple-darwin
|
||||
strip -x *.node
|
||||
- host: ubuntu-20.04
|
||||
target: aarch64-unknown-linux-gnu
|
||||
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
yarn build:release --target aarch64-unknown-linux-gnu
|
||||
pnpm build:release --target aarch64-unknown-linux-gnu
|
||||
aarch64-unknown-linux-gnu-strip *.node
|
||||
- host: ubuntu-20.04
|
||||
architecture: x64
|
||||
@ -77,7 +77,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
|
||||
build: |
|
||||
yarn build:release --target=armv7-unknown-linux-gnueabihf
|
||||
pnpm build:release --target=armv7-unknown-linux-gnueabihf
|
||||
arm-linux-gnueabihf-strip *.node
|
||||
- host: ubuntu-20.04
|
||||
architecture: x64
|
||||
@ -86,7 +86,7 @@ jobs:
|
||||
build: |
|
||||
cd tooling/cli/node
|
||||
rustup target add aarch64-unknown-linux-musl
|
||||
yarn build:release --target aarch64-unknown-linux-musl
|
||||
pnpm build:release --target aarch64-unknown-linux-musl
|
||||
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
|
||||
name: stable - ${{ matrix.settings.target }} - node@16
|
||||
runs-on: ${{ matrix.settings.host }}
|
||||
@ -98,8 +98,7 @@ jobs:
|
||||
with:
|
||||
node-version: 16
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: pnpm
|
||||
architecture: ${{ matrix.settings.architecture }}
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
@ -116,7 +115,7 @@ jobs:
|
||||
if: ${{ matrix.settings.setup }}
|
||||
shell: bash
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
|
||||
- name: Build in docker
|
||||
uses: addnab/docker-run-action@v3
|
||||
@ -157,7 +156,7 @@ jobs:
|
||||
# prepare: |
|
||||
# pkg install -y curl node14 python2
|
||||
# curl -qL https://www.npmjs.com/install.sh | sh
|
||||
# npm install -g yarn
|
||||
# npm install -g pnpm
|
||||
# curl https://sh.rustup.rs -sSf --output rustup.sh
|
||||
# sh rustup.sh -y --profile minimal --default-toolchain stable
|
||||
# export PATH="/usr/local/cargo/bin:$PATH"
|
||||
@ -165,8 +164,8 @@ jobs:
|
||||
# rustc --version
|
||||
# echo "~~~~ node -v ~~~~"
|
||||
# node -v
|
||||
# echo "~~~~ yarn --version ~~~~"
|
||||
# yarn --version
|
||||
# echo "~~~~ pnpm --version ~~~~"
|
||||
# pnpm --version
|
||||
# run: |
|
||||
# export PATH="/usr/local/cargo/bin:$PATH"
|
||||
# pwd
|
||||
@ -175,8 +174,8 @@ jobs:
|
||||
# env
|
||||
# freebsd-version
|
||||
# cd ./tooling/cli/node/
|
||||
# yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
# yarn build:release
|
||||
# pnpm install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
# pnpm build:release
|
||||
# strip -x *.node
|
||||
# rm -rf node_modules
|
||||
# rm -rf ../target
|
||||
@ -210,10 +209,9 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@ -223,7 +221,7 @@ jobs:
|
||||
run: ls -R .
|
||||
shell: bash
|
||||
- name: Test bindings
|
||||
run: yarn test
|
||||
run: pnpm test
|
||||
test-linux-x64-gnu-binding:
|
||||
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
|
||||
needs:
|
||||
@ -243,10 +241,9 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@ -260,7 +257,7 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
|
||||
- name: Test bindings
|
||||
run: yarn test
|
||||
run: pnpm test
|
||||
test-linux-x64-musl-binding:
|
||||
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
|
||||
needs:
|
||||
@ -282,10 +279,9 @@ jobs:
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@ -296,13 +292,13 @@ jobs:
|
||||
shell: bash
|
||||
- name: Setup and run tests
|
||||
run: |
|
||||
yarn tauri --help
|
||||
pnpm tauri --help
|
||||
ls -la
|
||||
#- name: Setup and run tests
|
||||
# run: |
|
||||
# rustup install stable
|
||||
# rustup default stable
|
||||
# yarn test
|
||||
# pnpm test
|
||||
# ls -la
|
||||
test-linux-arm-bindings:
|
||||
name: Test bindings on ${{ matrix.image }} - node@${{ matrix.node }}
|
||||
@ -327,7 +323,7 @@ jobs:
|
||||
run: ls -R .
|
||||
shell: bash
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm install --ignore-scripts --ignore-platform --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download aarch64-gnu artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@ -356,7 +352,7 @@ jobs:
|
||||
fnm install ${{ matrix.node }}
|
||||
fnm use ${{ matrix.node }}
|
||||
cd tooling/cli/node
|
||||
yarn tauri --help
|
||||
pnpm tauri --help
|
||||
ls -la
|
||||
publish:
|
||||
name: Publish
|
||||
@ -374,16 +370,15 @@ jobs:
|
||||
with:
|
||||
node-version: 20
|
||||
check-latest: true
|
||||
cache: yarn
|
||||
cache-dependency-path: 'tooling/cli/node/yarn.lock'
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
run: pnpm install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: tooling/cli/node/artifacts
|
||||
- name: Move artifacts
|
||||
run: yarn artifacts
|
||||
run: pnpm artifacts
|
||||
- name: List packages
|
||||
run: ls -R ./npm
|
||||
shell: bash
|
||||
|
9
.github/workflows/test-android.yml
vendored
9
.github/workflows/test-android.yml
vendored
@ -46,10 +46,7 @@ jobs:
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
cache-dependency-path: |
|
||||
tooling/api/yarn.lock
|
||||
examples/api/yarn.lock
|
||||
cache: pnpm
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
@ -95,11 +92,11 @@ jobs:
|
||||
|
||||
- name: build Tauri API
|
||||
working-directory: ./tooling/api
|
||||
run: yarn && yarn build
|
||||
run: pnpm i && pnpm build
|
||||
|
||||
- name: install API example dependencies
|
||||
working-directory: ./examples/api
|
||||
run: yarn
|
||||
run: pnpm i
|
||||
|
||||
- name: init Android Studio project
|
||||
working-directory: ./examples/api
|
||||
|
9
.github/workflows/test-cli-js.yml
vendored
9
.github/workflows/test-cli-js.yml
vendored
@ -42,8 +42,7 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
cache-dependency-path: tooling/cli/node/yarn.lock
|
||||
cache: pnpm
|
||||
|
||||
- name: install Linux dependencies
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
@ -61,6 +60,6 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
cd ./tooling/cli/node
|
||||
yarn
|
||||
yarn build
|
||||
yarn test
|
||||
pnpm i
|
||||
pnpm build
|
||||
pnpm test
|
||||
|
@ -10,8 +10,8 @@ if [ -z "$(git diff --name-only tooling/api)" ]; then
|
||||
echo "skipping api - no changes detected"
|
||||
else
|
||||
cd tooling/api
|
||||
yarn format
|
||||
yarn lint:fix
|
||||
pnpm format
|
||||
pnpm eslint:fix
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
@ -19,6 +19,6 @@ if [ -z "$(git diff --name-only tooling/cli/node)" ]; then
|
||||
echo "skipping \`@tauri-apps/cli\` - no changes detected"
|
||||
else
|
||||
cd tooling/cli/node
|
||||
yarn format
|
||||
pnpm format
|
||||
cd ../../..
|
||||
fi
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
echo "Building API definitions..."
|
||||
cd tooling\api
|
||||
yarn; yarn build
|
||||
pnpm i; pnpm build
|
||||
cd ..\..
|
||||
|
||||
echo "Installing the Tauri Rust CLI..."
|
||||
@ -23,8 +23,8 @@ $result = $host.ui.PromptForChoice("Node.js CLI", "Do you want to install the No
|
||||
switch ($result) {
|
||||
0{
|
||||
cd tooling\cli\node
|
||||
yarn; yarn build; yarn link
|
||||
pnpm i; pnpm build; pnpm link
|
||||
cd ..\..
|
||||
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
|
||||
echo "Tauri Node.js CLI installed. use `pnpm link @tauri-apps/cli` and run it with '$ pnpm tauri [COMMAND]'."
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
echo "Building API definitions..."
|
||||
cd tooling/api
|
||||
yarn && yarn build
|
||||
pnpm i && pnpm build
|
||||
cd ../..
|
||||
|
||||
echo "Building the Tauri Rust CLI..."
|
||||
@ -20,9 +20,9 @@ select yn in "Yes" "No"; do
|
||||
case $yn in
|
||||
Yes )
|
||||
cd tooling/cli/node
|
||||
yarn && yarn build && yarn link
|
||||
pnpm i && pnpm build && pnpm link
|
||||
cd ../../..
|
||||
echo "Tauri Node.js CLI installed. use `yarn link @tauri-apps/cli` and run it with '$ yarn tauri [COMMAND]'."
|
||||
echo "Tauri Node.js CLI installed. use `pnpm link @tauri-apps/cli` and run it with '$ pnpm tauri [COMMAND]'."
|
||||
break;;
|
||||
No ) break;;
|
||||
esac
|
||||
|
@ -128,7 +128,7 @@ Because of the many ways to build front-ends, we will stick with a common node.j
|
||||
The easiest way to do this is to run the following:
|
||||
|
||||
```
|
||||
npx create-tauri-app
|
||||
npm create tauri-app
|
||||
```
|
||||
|
||||
Which will ask you a bunch of questions about the framework you want to install and then create everything you need in a single folder - some via the placement of template files and some through normal installation procedures of your framework.
|
||||
@ -138,6 +138,8 @@ Which will ask you a bunch of questions about the framework you want to install
|
||||
Once everything is installed, you can run:
|
||||
|
||||
```
|
||||
pnpm tauri dev
|
||||
-or-
|
||||
yarn tauri dev
|
||||
-or-
|
||||
npm run tauri dev
|
||||
@ -157,7 +159,7 @@ If you modify your rust code or anything in the Cargo.toml, the window will clos
|
||||
If you need to get deeper insight into your current project, or triage requires investigation of installed components, just run:
|
||||
|
||||
```
|
||||
yarn tauri info
|
||||
pnpm tauri info
|
||||
```
|
||||
|
||||
## What does the Release flow look like?
|
||||
@ -169,7 +171,7 @@ Depending upon the operating system that the developer (or CI) is building the a
|
||||
To kick off this process, just:
|
||||
|
||||
```
|
||||
yarn tauri build
|
||||
pnpm tauri build
|
||||
```
|
||||
|
||||
After some time, the process will end and you can see the results in the `./src-tauri/target/release` folder.
|
||||
|
@ -25,24 +25,18 @@ Windows:
|
||||
- Install dependencies (Run inside of this folder `examples/api/`)
|
||||
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn
|
||||
# with npm
|
||||
$ npm install
|
||||
$ pnpm i
|
||||
```
|
||||
|
||||
- Run the app in development mode (Run inside of this folder `examples/api/`)
|
||||
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn tauri dev
|
||||
# with npm
|
||||
$ npm run tauri dev
|
||||
$ pnpm tauri dev
|
||||
```
|
||||
|
||||
- Build an run the release app (Run inside of this folder `examples/api/`)
|
||||
|
||||
```bash
|
||||
$ yarn tauri build
|
||||
$ pnpm tauri build
|
||||
$ ./src-tauri/target/release/app
|
||||
```
|
||||
|
@ -6,8 +6,8 @@
|
||||
"build": {
|
||||
"frontendDist": "../dist",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"beforeBuildCommand": "yarn build"
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build"
|
||||
},
|
||||
"app": {
|
||||
"withGlobalTauri": true,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
@ -22,27 +22,18 @@ Windows:
|
||||
- Install dependencies (Run inside of this folder `examples/resources/`)
|
||||
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn
|
||||
# with npm
|
||||
$ npm install
|
||||
|
||||
$ yarn tauri
|
||||
$ yarn package
|
||||
$ pnpm i
|
||||
```
|
||||
|
||||
- Run the app in development mode (Run inside of this folder `examples/resources/`)
|
||||
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn tauri dev
|
||||
# with npm
|
||||
$ npm run tauri dev
|
||||
$ pnpm tauri dev
|
||||
```
|
||||
|
||||
- Build an run the release app (Run inside of this folder `examples/resources/`)
|
||||
|
||||
```bash
|
||||
$ yarn tauri build
|
||||
$ pnpm tauri build
|
||||
$ ./src-tauri/target/release/app
|
||||
```
|
||||
|
12
package.json
12
package.json
@ -13,15 +13,13 @@
|
||||
"scripts": {
|
||||
"format": "prettier --write . --config .prettierrc --ignore-path .prettierignore",
|
||||
"format:check": "prettier --check . --config .prettierrc --ignore-path .prettierignore",
|
||||
"postinstall": "husky install"
|
||||
"eslint:check": "pnpm run -r eslint:check",
|
||||
"ts:check": "pnpm run -r ts:check",
|
||||
"postinstall": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"covector": "^0.9.0",
|
||||
"husky": "^6.0.0",
|
||||
"husky": "^9.1.4",
|
||||
"prettier": "^3.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||
"packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf"
|
||||
}
|
||||
|
5245
pnpm-lock.yaml
Normal file
5245
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
6
pnpm-workspace.yaml
Normal file
6
pnpm-workspace.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
packages:
|
||||
- tooling/api
|
||||
- tooling/cli/node
|
||||
- examples/api
|
||||
- examples/resources
|
||||
- examples/file-associations
|
@ -32,8 +32,9 @@ To learn more about the details of how all of these pieces fit together, please
|
||||
The preferred method is to install this module locally as a dependency:
|
||||
|
||||
```
|
||||
$ npm install --save @tauri-apps/api
|
||||
$ pnpm add @tauri-apps/api
|
||||
$ yarn add @tauri-apps/api
|
||||
$ npm add @tauri-apps/api
|
||||
```
|
||||
|
||||
## Semver
|
||||
|
@ -37,13 +37,11 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c --configPlugin typescript",
|
||||
"npm-pack": "yarn build && cd ./dist && npm pack",
|
||||
"npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly --tag next",
|
||||
"npm-pack": "pnpm build && cd ./dist && npm pack",
|
||||
"npm-publish": "pnpm build && cd ./dist && pnpm publish --access public --loglevel silly --tag next",
|
||||
"ts:check": "tsc --noEmit",
|
||||
"lint": "eslint src/**.ts",
|
||||
"lint:fix": "eslint src/**.ts --fix",
|
||||
"format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore",
|
||||
"format:check": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path ../../.prettierignore"
|
||||
"eslint:check": "eslint src/**.ts",
|
||||
"eslint:fix": "eslint src/**.ts --fix"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.4.0",
|
||||
@ -60,11 +58,6 @@
|
||||
"rollup": "4.19.0",
|
||||
"tslib": "^2.6.3",
|
||||
"typescript": "^5.4.5",
|
||||
"typescript-eslint": "rc-v8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18.18",
|
||||
"npm": ">= 6.6.0",
|
||||
"yarn": ">= 1.19.1"
|
||||
"typescript-eslint": "^8.1.0"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,5 +7,4 @@ test
|
||||
.eslintrc
|
||||
.prettierignore
|
||||
rustfmt.toml
|
||||
yarn.lock
|
||||
*.node
|
||||
|
@ -19,7 +19,7 @@ Tauri is a polyglot and generic system that is very composable and allows engine
|
||||
|
||||
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 `yarn tauri dev`. For the most part it is a wrapper around [tauri-cli](https://github.com/tauri-apps/tauri/blob/dev/tooling/cli).
|
||||
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.
|
||||
|
||||
@ -28,8 +28,9 @@ To learn more about the details of how all of these pieces fit together, please
|
||||
|
||||
The preferred method is to install this module locally as a development dependency:
|
||||
```
|
||||
$ npm install --save-dev @tauri-apps/cli
|
||||
$ yarn add --dev @tauri-apps/cli
|
||||
$ pnpm add -D @tauri-apps/cli
|
||||
$ yarn add -D @tauri-apps/cli
|
||||
$ npm add -D @tauri-apps/cli
|
||||
```
|
||||
|
||||
## Semver
|
||||
|
@ -46,9 +46,6 @@
|
||||
"jest-transform-toml": "1.0.0",
|
||||
"prettier": "3.3.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"json5": "2.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
@ -63,8 +60,6 @@
|
||||
"prepack": "cp ../schema.json .",
|
||||
"test": "jest --runInBand --forceExit --no-cache",
|
||||
"version": "napi version",
|
||||
"tauri": "node ./tauri.js",
|
||||
"format": "prettier --write ./package.json ./tauri.js",
|
||||
"format:check": "prettier --check ./package.json ./tauri.js"
|
||||
"tauri": "node ./tauri.js"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@
|
||||
"build": {
|
||||
"distDir": "../dist",
|
||||
"devPath": "http://localhost:5173",
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"beforeBuildCommand": "yarn build"
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build"
|
||||
},
|
||||
"package": {
|
||||
"productName": "Tauri API",
|
||||
@ -133,4 +133,4 @@
|
||||
"menuOnLeftClick": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
"version": "0.0.0",
|
||||
"identifier": "com.tauri.dev",
|
||||
"build": {
|
||||
"beforeDevCommand": "yarn dev",
|
||||
"beforeBuildCommand": "yarn build",
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
|
@ -18,8 +18,8 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"prepublishOnly": "yarn build",
|
||||
"pretest": "yarn build"
|
||||
"prepublishOnly": "pnpm build",
|
||||
"pretest": "pnpm build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": ">=2.0.0-beta.6"
|
||||
|
Loading…
Reference in New Issue
Block a user