@rust-js/create 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
- package/template/Cargo.toml +1 -1
- package/template/package.json +1 -1
- package/template/src/App.css +3 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @rust-js/create
|
|
2
2
|
|
|
3
3
|
```bash
|
|
4
|
-
bun create @rust-js my-app # with Bun
|
|
5
|
-
npm create @rust-js my-app # with Node.js
|
|
4
|
+
bun create @rust-js@latest my-app # with Bun
|
|
5
|
+
npm create @rust-js@latest my-app # with Node.js
|
|
6
6
|
```
|
|
7
7
|
|
|
8
8
|
makes `my-app`, a Vite and React app whose component is written in Rust
|
package/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const at = args.indexOf("--local");
|
|
|
20
20
|
const local = at >= 0 ? args.splice(at, 2)[1] : undefined;
|
|
21
21
|
if (at >= 0 && !local) fail("--local needs a distribution, the directory `bun run pack:distribution` makes");
|
|
22
22
|
const [directory, ...extra] = args;
|
|
23
|
-
if (!directory || extra.length) fail("usage: bun create @rust-js <directory> [--local <distribution>]");
|
|
23
|
+
if (!directory || extra.length) fail("usage: bun create @rust-js@latest <directory> [--local <distribution>]");
|
|
24
24
|
|
|
25
25
|
// A distribution is for one host, and one compiler: this one's.
|
|
26
26
|
const dist = local && resolve(local);
|
package/package.json
CHANGED
package/template/Cargo.toml
CHANGED
|
@@ -13,7 +13,7 @@ path = "src/App.rs"
|
|
|
13
13
|
|
|
14
14
|
[dependencies]
|
|
15
15
|
js = { package = "rust-js-builtins", version = "~0.0.1" }
|
|
16
|
-
react = { package = "rust-js-react", version = "~0.0.
|
|
16
|
+
react = { package = "rust-js-react", version = "~0.0.3" }
|
|
17
17
|
webapi = { package = "rust-js-webapi", version = "~0.0.2" }
|
|
18
18
|
|
|
19
19
|
# rust-js compiles with `--cfg=rust_js` (ADR 0113): a `cfg` Cargo checks for,
|
package/template/package.json
CHANGED
package/template/src/App.css
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
border: 2px solid transparent;
|
|
8
8
|
transition: border-color 0.3s;
|
|
9
9
|
margin-bottom: 24px;
|
|
10
|
+
/* A flex box ends its text, "Count is ", at its last letter, and the count
|
|
11
|
+
is a box of its own: one character, as its font is monospace. */
|
|
12
|
+
gap: 1ch;
|
|
10
13
|
|
|
11
14
|
&:hover {
|
|
12
15
|
border-color: var(--accent-border);
|