Преглед на файлове

fix: Add the --locked param to every cli installation command (#1427)

Marc Espín преди 1 година
родител
ревизия
95887e836c
променени са 4 файла, в които са добавени 12 реда и са изтрити 9 реда
  1. 1 1
      docs/guide/src/en/getting_started/web.md
  2. 6 5
      examples/PWA-example/README.md
  3. 3 1
      packages/cli/README.md
  4. 2 2
      packages/cli/docs/src/installation.md

+ 1 - 1
docs/guide/src/en/getting_started/web.md

@@ -25,7 +25,7 @@ The Web is the best-supported target platform for Dioxus.
 To develop your Dioxus app for the web, you'll need a tool to build and serve your assets. We recommend using [dioxus-cli](https://github.com/DioxusLabs/dioxus/tree/master/packages/cli) which includes a build system, Wasm optimization, a dev server, and support hot reloading:
 
 ```shell
-cargo install dioxus-cli
+cargo install dioxus-cli --locked
 ```
 
 Make sure the `wasm32-unknown-unknown` target for rust is installed:

+ 6 - 5
examples/PWA-example/README.md

@@ -7,12 +7,13 @@ It is also very much usable as a template for your projects, if you're aiming to
 
 ## Try the example
 
-Make sure you have Dioxus CLI installed (if you're unsure, run `cargo install dioxus-cli`).
+Make sure you have Dioxus CLI installed (if you're unsure, run `cargo install dioxus-cli --locked`).
 
 You can run `dx serve` in this directory to start the web server locally, or run
 `dx build --release` to build the project so you can deploy it on a separate web-server.
 
 ## Project Structure
+
 ```
 ├── Cargo.toml
 ├── Dioxus.toml
@@ -33,12 +34,12 @@ You can run `dx serve` in this directory to start the web server locally, or run
 
 If you're just getting started with PWAs, here are some useful resources:
 
-* [PWABuilder docs](https://docs.pwabuilder.com/#/)
-* [MDN article on PWAs](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
+- [PWABuilder docs](https://docs.pwabuilder.com/#/)
+- [MDN article on PWAs](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
 
 For service worker scripting (in JavaScript):
 
-* [Service worker guide from PWABuilder](https://docs.pwabuilder.com/#/home/sw-intro)
-* [Service worker examples, also from PWABuilder](https://github.com/pwa-builder/pwabuilder-serviceworkers)
+- [Service worker guide from PWABuilder](https://docs.pwabuilder.com/#/home/sw-intro)
+- [Service worker examples, also from PWABuilder](https://github.com/pwa-builder/pwabuilder-serviceworkers)
 
 If you want to stay as close to 100% Rust as possible, you can try using [wasi-worker](https://github.com/dunnock/wasi-worker) to replace the JS service worker file. The JSON manifest will still be required though.

+ 3 - 1
packages/cli/README.md

@@ -11,7 +11,7 @@ It handles all building, bundling, development and publishing to simplify develo
 ### Install the stable version (recommended)
 
 ```
-cargo install dioxus-cli
+cargo install dioxus-cli --locked
 ```
 
 ### Install the latest development build through git
@@ -28,6 +28,7 @@ This will download the CLI from the master branch,
 and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
 
 ### Install from local folder
+
 ```
 cargo install --path . --debug
 ```
@@ -52,6 +53,7 @@ You can use the `Dioxus.toml` file for further configuration.
 Some fields are mandatory, but the CLI tool will tell you which ones are missing.
 You can create a `Dioxus.toml` with all fields already set using `dx config init project-name`,
 or you can use this bare-bones template (only mandatory fields) to get started:
+
 ```toml
 [application]
 name = "project-name"

+ 2 - 2
packages/cli/docs/src/installation.md

@@ -16,8 +16,8 @@ and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
 The published version of the Dioxus CLI is updated less often, but is more stable than the git version.
 
 ```
-cargo install dioxus-cli
+cargo install dioxus-cli --locked
 ```
 
 Run `dx --help` for a list of all the available commands.
-Furthermore, you can run `dx <COMMAND> --help` to get help with a specific command.
+Furthermore, you can run `dx <COMMAND> --help` to get help with a specific command.