From a0a1032d1e3259fe7ee1f950f616c499f6f96e1a Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Wed, 1 Jan 2020 09:30:43 -0300 Subject: [PATCH] fix(docs&wiki) tauri config is src-tauri/tauri.conf.json --- docs-generator/src/markdown/api.md | 6 +++--- docs-generator/src/markdown/book.md | 2 +- docs-generator/src/markdown/cli.md | 6 +++--- docs-generator/src/markdown/config.md | 2 +- docs-generator/src/markdown/noserver.md | 4 ++-- docs-generator/src/pages/Introduction.vue | 6 +++--- docs-generator/src/pages/Patterns.vue | 4 ++-- docs/js/83b1e7f2.946267a6.js | 2 +- wiki_pages/01. Introduction.md | 2 +- wiki_pages/06. App Development.md | 2 +- wiki_pages/07. App Publishing.md | 2 +- wiki_pages/09. Modes.md | 4 ++-- wiki_pages/12. CLI.md | 6 +++--- wiki_pages/15. Detailed Flow.md | 16 ++++++++-------- 14 files changed, 32 insertions(+), 32 deletions(-) diff --git a/docs-generator/src/markdown/api.md b/docs-generator/src/markdown/api.md index 12db20a..3ad4818 100644 --- a/docs-generator/src/markdown/api.md +++ b/docs-generator/src/markdown/api.md @@ -26,7 +26,7 @@ chainWebpack (chain) { The official helper waits for -They are configured in the `tauri.conf.js` file with the following object: +They are configured in the `src-tauri/tauri.conf.json` file with the following object: ## Whitelist ``` @@ -51,7 +51,7 @@ These features will be added to your project's `src-taurl/Cargo.toml` at build t * @module tauri * @description This API interface makes powerful interactions available * to be run on client side applications. They are opt-in features, and - * must be enabled in tauri.conf.js + * must be enabled in src-tauri/tauri.conf.json > tauri > whitelist */ /** @@ -241,7 +241,7 @@ tauri.addEventListener('reply', res => { }) ``` -But as long as `event: true` is set in `tauri.conf.js`, you can always emit from any part of your code. Here are a few more examples of things you can do: +But as long as `event: true` is set in `src-tauri/tauri.conf.json > tauri > whitelist`, you can always emit from any part of your code. Here are a few more examples of things you can do: ```rust tauri::event::emit(handle, "reply", serde_json::to_string(&reply).unwrap()); tauri::event::emit(handle, "reply", "{'msg': 'changed by rust emit'}".to_string()); diff --git a/docs-generator/src/markdown/book.md b/docs-generator/src/markdown/book.md index 8b43eed..6c11f33 100644 --- a/docs-generator/src/markdown/book.md +++ b/docs-generator/src/markdown/book.md @@ -93,7 +93,7 @@ This is an early outline of the contents that we expect to publish. Contents sub - Icons - Splash Screens - Window - - `tauri.conf.js` + - `src-tauri/tauri.conf.json` 6. Preparing your code - Transpile dynamic imports - Remove webpack chunking diff --git a/docs-generator/src/markdown/cli.md b/docs-generator/src/markdown/cli.md index a74f682..496fd51 100644 --- a/docs-generator/src/markdown/cli.md +++ b/docs-generator/src/markdown/cli.md @@ -8,7 +8,7 @@ The main Tauri CLI is a NodeJS program that has a number of subcommands: ## init ``` Description - Inits the Tauri template. If Tauri cannot find the tauri.conf.js + Inits the Tauri template. If Tauri cannot find the src-tauri/tauri.conf.json it will create one. Usage $ tauri init @@ -29,7 +29,7 @@ The main Tauri CLI is a NodeJS program that has a number of subcommands: Options --help, -h Displays this message ``` -This command is rigged via your `tauri.conf.js`. +This command is rigged via your `src-tauri/tauri.conf.json`. ## build @@ -41,7 +41,7 @@ This command is rigged via your `tauri.conf.js`. Options --help, -h Displays this message ``` -This command is rigged via your `tauri.conf.js`. +This command is rigged via your `src-tauri/tauri.conf.json`. ## icon ``` diff --git a/docs-generator/src/markdown/config.md b/docs-generator/src/markdown/config.md index ea86569..3bbd7b6 100644 --- a/docs-generator/src/markdown/config.md +++ b/docs-generator/src/markdown/config.md @@ -1,4 +1,4 @@ -## tauri.conf.js +## src-tauri/tauri.conf.json ``` const path = require('path') diff --git a/docs-generator/src/markdown/noserver.md b/docs-generator/src/markdown/noserver.md index 193a4fc..98250ae 100644 --- a/docs-generator/src/markdown/noserver.md +++ b/docs-generator/src/markdown/noserver.md @@ -1,6 +1,6 @@ ## No Server? -If you want the highest degree of security, then you will never ship a server with your app if you don't have to. The `no-server` mode that you can configure in `tauri.conf.js` will do just that: Ship your app without a server. It requires a bit of extra effort on your part, in that you will need to modify your webpack config or chain and add an extra node module to your project dependencies. +If you want the highest degree of security, then you will never ship a server with your app if you don't have to. The `no-server` mode that you can configure in `src-tauri/tauri.conf.json` will do just that: Ship your app without a server. It requires a bit of extra effort on your part, in that you will need to modify your webpack config or chain and add an extra node module to your project dependencies. ### Installation and Setup @@ -9,7 +9,7 @@ yarn add @tauri-apps/tauri-webpack ``` -In your `tauri.conf.js` +In your `src-tauri/tauri.conf.json` ```js tauri: { embeddedServer: { diff --git a/docs-generator/src/pages/Introduction.vue b/docs-generator/src/pages/Introduction.vue index 6a7dce5..8cfa5f2 100644 --- a/docs-generator/src/pages/Introduction.vue +++ b/docs-generator/src/pages/Introduction.vue @@ -19,13 +19,13 @@ We are assuming that you know what the command line is, how to install packages on your operating system and generally know your way around the development side of computing. Obviously, you must first make sure that all required languages / compilers are available and in your PATH. Then you globally install the Tauri CLI with your Node package manager. ### Initializing an App -The initialization phase creates a folder and places a few template files into your project directory. The most important file that it creates is the `tauri.conf.js` file, as this is where you manage the configuration of your project. +The initialization phase creates a folder and places a few template files into your project directory. The most important file that it creates is the `src-tauri/tauri.conf.json` file, as this is where you manage the configuration of your project. ### Developing an App There are several methods for developing an App and using the built-in development App Window. The most common is to point the Tauri configuration at a localhost port that your front-end framework's development server provides you with. If your framework doesn't provide you with this, or you like everything vanilla, then you can instruct Tauri to serve (and transpile if needed) from a relative file path. In both cases you will have HMR (Hot Module Reloading). ### Making App Icons -Your app will need icons, and Tauri also provides a command for making all the icons your app will need, no matter which platform you are using. Simply place a 1240x1240 png (with transparency) named `app-icon.png` in your project folder (where the `tauri.conf.js` file is to be found) and run `tauri icon`. The icons will be placed in `src-tauri/icons` and automatically consumed by Tauri during the build process. +Your app will need icons, and Tauri also provides a command for making all the icons your app will need, no matter which platform you are using. Simply place a 1240x1240 png (with transparency) named `app-icon.png` in your project folder (where the `src-tauri/tauri.conf.json` file is to be found) and run `tauri icon`. The icons will be placed in `src-tauri/icons` and automatically consumed by Tauri during the build process. ### Bundling an App The basic process of building a Tauri App is very straightforward and unopinionated. In the Tauri configuration file you reference a distribution folder e.g. `../dist/spa` where your HTML, CSS, JS and other assets can be found. Then you tell the Tauri CLI to build your app. Tauri prepares your code depending upon your configuration and bundles everything up into a nice and tidy binary. @@ -47,7 +47,7 @@ We are currently working on enabling the Web APIs and most of them may not be av ## The Templates -First is the tauri.conf.js file - it is injected into the CWD at tauri init. +First is the src-tauri/tauri.conf.json file - it is injected into the CWD at tauri init. Then is the src-tauri folder, which is injected into the CWD and contains the base Rust application that you can extend as you wish. The node CLI has a bunch of "syntactic" sugar that sets up the dev env or prepares assets for the bundle process (as well as the tauri icon command for making icons.) diff --git a/docs-generator/src/pages/Patterns.vue b/docs-generator/src/pages/Patterns.vue index 118f09f..d433db0 100644 --- a/docs-generator/src/pages/Patterns.vue +++ b/docs-generator/src/pages/Patterns.vue @@ -1,7 +1,7 @@