Skip to content

Commit

Permalink
chore(docs): devPath & distDir are relative to tauri.conf.json, c…
Browse files Browse the repository at this point in the history
…loses #2236 (#2259)

* chore(docs): `devPath` & `distDir` are relative to tauri.conf.json

* change cli.rs message
  • Loading branch information
amrbashir authored Jul 21, 2021
1 parent 7858658 commit 74a278f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions docs/api/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ It's composed of the following properties:
## `build`

<Properties anchorRoot="build" rows={[
{property: "distDir", type: "string", description: `The path—either absolute or relative—to the production-ready webpage/webapp directory that will be bundled by Tauri.
{property: "distDir", type: "string", description: `The path to the production-ready webpage/webapp directory (either absolute or relative to tauri.conf.json) that will be bundled by Tauri.

<div class="alert alert--info" role="alert" style="margin-top: 10px;">
The target directory <em>must</em> contain an index.html file.
</div>`},
{property: "devPath", type: "string", description: `Can be a patheither absolute or relativeto a folder or a URL (like a live reload server).`},
{property: "devPath", type: "string", description: `Can be a path to a folder (either absolute or relative to tauri.conf.json) or a URL (like a live reload server).`},
{property: "beforeDevCommand", optional: true, type: "string", description: `A command to run before starting Tauri in dev mode.`},
{property: "beforeBuildCommand", optional: true, type: "string", description: `A command to run before starting Tauri in build mode.`},
{property: "withGlobalTauri", optional: true, type: "boolean", description: "Enables the API injection to the window.__TAURI__ object. Useful if you're using Vanilla JS instead of importing the API using Rollup or Webpack. Reduces the command security since any external code can access it, so be careful with XSS attacks."}
Expand Down Expand Up @@ -66,7 +66,7 @@ It's composed of the following properties:
<li>Using an equals and no space such as <code>-o=value</code> or <code>--option=value</code></li>
<li>Use a short and no space such as <code>-ovalue</code></li>
</ul>
</div>`
</div>`
},
{ property: "index", type: "number", optional: true, description: `The positional argument index, starting at 1.
<div class="alert alert--info" role="alert" style="margin-top: 10px;">
Expand Down Expand Up @@ -135,7 +135,7 @@ It's composed of the following properties:
{ property: "externalBin", optional: true, type: "string[]", description: `A list of—either absolute or relative—paths to binaries to embed with your application.
<div class="alert alert--info" role="alert" style="margin-top: 10px;">
Note that Tauri will look for system-specific binaries following the pattern "binary-name{-target-triple}{.system-extension}". <br/>
E.g. you typed "my-binary":
E.g. you typed "my-binary":
<ul>
<li>"my-binary-x86_64-pc-windows-msvc.exe" for Windows</li>
<li>"my-binary-x86_64-apple-darwin" for macOS</li>
Expand All @@ -144,7 +144,7 @@ It's composed of the following properties:
so don't forget to provide binaries for <strong>all targeted platforms</strong>.
</div>` },
{ property: "copyright", optional: true, type: "string", description: `A copyright string associated with your application.` },
{ property: "category", optional: true, type: "string", description: `What kind of application this is.
{ property: "category", optional: true, type: "string", description: `What kind of application this is.
Should be one among the following list: <br/>
Business, DeveloperTool, Education, Entertainment, Finance, Game, ActionGame, AdventureGame, ArcadeGame, BoardGame, CardGame, CasinoGame, DiceGame, EducationalGame, FamilyGame, KidsGame, MusicGame, PuzzleGame, RacingGame, RolePlayingGame, SimulationGame, SportsGame, StrategyGame, TriviaGame, WordGame, GraphicsAndDesign, HealthcareAndFitness, Lifestyle, Medical, Music, News, Photography, Productivity, Reference, SocialNetworking, Sports, Travel, Utility, Video, Weather.
` },
Expand Down Expand Up @@ -278,7 +278,7 @@ It's composed of the following properties:
{
property: "security", type: "object",
child: <Properties anchorRoot="tauri.security" rows={[
{ property: "csp", optional: true, type: "string", description: `The Content Security Policy.
{ property: "csp", optional: true, type: "string", description: `The Content Security Policy.
<div class="alert alert--warning" role="alert" style="margin-top: 10px;">
This is a really important part of the configuration since it helps you ensure your WebView is secured. See more <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP" target="_blank">on Mozilla</a>.
</div>` },
Expand Down
2 changes: 1 addition & 1 deletion tooling/cli.rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn init_command(matches: &ArgMatches) -> Result<()> {
dist_dir,
dist_dir,
ci,
r#"Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri" folder that will be created?"#,
r#"Where are your web assets (HTML/CSS/JS) located, relative to the "<current dir>/src-tauri/tauri.conf.json" file that will be created?"#,
init_defaults.framework.as_ref().map(|f| f.dist_dir())
);
init_runner = value_or_prompt!(
Expand Down

0 comments on commit 74a278f

Please sign in to comment.