Restructure Rust project
This commit is contained in:
parent
1179ec1769
commit
82d287d9c4
73 changed files with 15 additions and 11 deletions
|
@ -6,7 +6,7 @@ authors = ["Wilson Lin <code@wilsonl.in>"]
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
minify-html = { path = "../.." }
|
||||
minify-html = { path = "../../rust/main" }
|
||||
structopt = "0.3.5"
|
||||
serde = { version = "1.0.104", features = ["derive"] }
|
||||
serde_json = "1.0.44"
|
||||
|
|
|
@ -7,5 +7,5 @@ authors = ["Wilson Lin <code@wilsonl.in>"]
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
minify-html = { path = "..", features = ["js-esbuild"] }
|
||||
minify-html = { path = "../rust/main", features = ["js-esbuild"] }
|
||||
structopt = "0.3"
|
||||
|
|
|
@ -7,4 +7,4 @@ edition = "2018"
|
|||
|
||||
[dependencies]
|
||||
afl = "0.10.0"
|
||||
minify-html = { path = ".." }
|
||||
minify-html = { path = "../rust/main" }
|
||||
|
|
|
@ -5,4 +5,4 @@ authors = ["Wilson Lin <code@wilsonl.in>"]
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
minify-html = { path = "../.." }
|
||||
minify-html = { path = "../../rust/main" }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { mkdirSync, writeFileSync } from "fs";
|
||||
import { join } from "path";
|
||||
|
||||
export const RUST_OUT_DIR = join(__dirname, "..", "src", "gen");
|
||||
export const RUST_OUT_DIR = join(__dirname, "..", "rust", "common", "src", "gen");
|
||||
|
||||
try {
|
||||
mkdirSync(RUST_OUT_DIR);
|
||||
|
|
|
@ -6,7 +6,7 @@ authors = ["Wilson Lin <code@wilsonl.in>"]
|
|||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
minify-html = { path = "..", features = ["js-esbuild"] }
|
||||
minify-html = { path = "../rust/main", features = ["js-esbuild"] }
|
||||
jni = "0.14.0"
|
||||
|
||||
[lib]
|
||||
|
|
|
@ -19,4 +19,4 @@ cbindgen = "0.14"
|
|||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
minify-html = { path = "../..", optional = true }
|
||||
minify-html = { path = "../../rust/main", optional = true }
|
||||
|
|
|
@ -4,7 +4,7 @@ set -e
|
|||
|
||||
pushd "$(dirname "$0")"
|
||||
|
||||
# Generate crate::gen::* code.
|
||||
# Generate common::gen::* code.
|
||||
pushd gen
|
||||
npm i
|
||||
bash gen.sh
|
||||
|
|
|
@ -10,5 +10,5 @@ name = "minify_html_ruby_lib"
|
|||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
minify-html = { path = "..", features = ["js-esbuild"] }
|
||||
minify-html = { path = "../rust/main", features = ["js-esbuild"] }
|
||||
rutie = "0.7.0"
|
||||
|
|
2
.gitignore → rust/common/.gitignore
vendored
2
.gitignore → rust/common/.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
/Cargo.lock
|
||||
/target
|
||||
/src/gen/
|
||||
/target
|
2
rust/main/.gitignore
vendored
Normal file
2
rust/main/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/Cargo.lock
|
||||
/target
|
2
rust/onepass/.gitignore
vendored
Normal file
2
rust/onepass/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/Cargo.lock
|
||||
/target
|
2
version
2
version
|
@ -101,6 +101,6 @@ cmd('cargo', 'generate-lockfile');
|
|||
cmd('git', 'add', '-A');
|
||||
cmd('git', 'commit', '-m', NEW_VERSION);
|
||||
cmd('git', 'tag', '-a', `v${NEW_VERSION}`, '-m', '');
|
||||
// We have generated but ignored in `src/gen`.
|
||||
// We have generated but ignored in `rust/common/gen`.
|
||||
cmd('cargo', 'publish', '--allow-dirty');
|
||||
cmd('git', 'push', '--follow-tags');
|
||||
|
|
Loading…
Add table
Reference in a new issue