Skip to content

Commit 06344f2

Browse files
doc: improve README
1 parent 909e334 commit 06344f2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "create-rust-github-repo"
3+
description = "`create-rust-github-repo` is a CLI program that creates a new repository on GitHub, clones it locally, initializes a Rust project, copies the configs from a pre-existing directory."
34
version = "0.2.1"
45
edition = "2021"
56
license = "Apache-2.0 OR MIT"
6-
description = "`create-rust-github-repo` is a CLI program that creates a new repository on GitHub, clones it locally, initializes a Rust project, copies the configs from a pre-existing directory."
77
homepage = "https://github.com/DenisGorbachev/create-rust-github-repo"
88
repository = "https://github.com/DenisGorbachev/create-rust-github-repo"
99
readme = "README.md"

README.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
import * as zx from 'npm:zx'
44
import { z, ZodSchema } from "https://deno.land/x/[email protected]/mod.ts";
5+
import { assertEquals } from 'https://jsr.io/@std/assert/1.0.0/equals.ts'
56

67
const CargoToml = z.object({
78
package: z.object({
8-
name: z.string(),
9-
description: z.string(),
9+
name: z.string().min(1),
10+
description: z.string().min(1),
11+
repository: z.string().url().min(1),
1012
metadata: z.object({
1113
details: z.object({
12-
title: z.string(),
14+
title: z.string().min(1),
1315
tagline: z.string(),
1416
summary: z.string(),
1517
})
@@ -38,6 +40,8 @@ const help = await $`cargo run --quiet --bin ${bin} -- --help`
3840
const repo: Repo = parse(Repo, await $`gh repo view --json url`)
3941
const extraBins = (await $`find src/bin/*.rs -type f -exec basename {} .rs \\;`).valueOf().split("\n")
4042

43+
assertEquals(repo.url, theCargoToml.package.repository)
44+
4145
const autogenerated = `
4246
<!-- DO NOT EDIT -->
4347
<!-- This file is automatically generated by README.ts. -->

0 commit comments

Comments
 (0)