Update zlugify to zig 0.14.0.
This commit is contained in:
parent
e5e9457e33
commit
ac3bffee68
3 changed files with 22 additions and 20 deletions
|
@ -14,7 +14,7 @@ _zlugify_ is a library to generate slugs from all types of UTF-8 encoded strings
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
zlugify 1.0.1 is made and tested with zig 0.13.0.
|
zlugify 1.1.0 is made and tested with zig 0.14.0.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ zlugify 1.0.1 is made and tested with zig 0.13.0.
|
||||||
In your project directory:
|
In your project directory:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ zig fetch --save https://code.zeptotech.net/zedd/zlugify/archive/v1.0.1.tar.gz
|
$ zig fetch --save https://code.zeptotech.net/zedd/zlugify/archive/v1.1.0.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
In `build.zig`:
|
In `build.zig`:
|
||||||
|
|
|
@ -4,8 +4,8 @@ pub fn build(b: *std.Build) void {
|
||||||
const target = b.standardTargetOptions(.{});
|
const target = b.standardTargetOptions(.{});
|
||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
// Add anyascii.zig dependency.
|
// Add anyascii dependency.
|
||||||
const anyascii = b.dependency("anyascii.zig", .{
|
const anyascii = b.dependency("anyascii", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
@ -16,15 +16,15 @@ pub fn build(b: *std.Build) void {
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
// Add anyascii dependency.
|
||||||
zlugify.addImport("anyascii", anyascii.module("anyascii"));
|
zlugify.addImport("anyascii", anyascii.module("anyascii"));
|
||||||
|
|
||||||
// Library unit tests.
|
// Library unit tests.
|
||||||
const lib_unit_tests = b.addTest(.{
|
const lib_unit_tests = b.addTest(.{
|
||||||
.root_source_file = b.path("src/lib.zig"),
|
.root_module = zlugify,
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
lib_unit_tests.root_module.addImport("anyascii", anyascii.module("anyascii"));
|
|
||||||
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
|
const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);
|
||||||
|
|
||||||
const test_step = b.step("test", "Run unit tests.");
|
const test_step = b.step("test", "Run unit tests.");
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
.{
|
.{
|
||||||
.name = "zlugify",
|
.name = .zlugify,
|
||||||
.version = "1.0.1",
|
.version = "1.1.0",
|
||||||
|
|
||||||
.dependencies = .{
|
.fingerprint = 0x60f9ca2959523881,
|
||||||
.@"anyascii.zig" = .{
|
|
||||||
.url = "https://code.zeptotech.net/zedd/anyascii.zig/archive/v1.1.1.tar.gz",
|
|
||||||
.hash = "1220800d403fc841a4c7b9d09ae8759ae28adff05de33836a3f69f02e8e0ac77bae9",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
.paths = .{
|
.dependencies = .{
|
||||||
"build.zig",
|
.anyascii = .{
|
||||||
"build.zig.zon",
|
.url = "https://code.zeptotech.net/zedd/anyascii.zig/archive/v1.2.0.tar.gz",
|
||||||
"src",
|
.hash = "anyascii-1.2.0-rvK7q3iGFABchFPwDMdB5tpj716jR3mukBiuMT-PdD5-",
|
||||||
"README.md",
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
.paths = .{
|
||||||
|
"build.zig",
|
||||||
|
"build.zig.zon",
|
||||||
|
"src",
|
||||||
|
"README.md",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue