mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 13:02:20 +00:00
Add metadata (#45)
* Add wasm-pack metadata * Add Wasm tests directory * Add basic Cargo manifest metadata * Make web frontend unpublishable to npm
This commit is contained in:
parent
e58f314527
commit
2f2bbb3a8b
8 changed files with 61 additions and 25 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -47,6 +47,16 @@ dependencies = [
|
|||
name = "graphite-renderer-core"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "graphite-wasm-wrapper"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"graphite-editor-core",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-test",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.49"
|
||||
|
@ -202,16 +212,6 @@ dependencies = [
|
|||
"quote",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-wrapper"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"graphite-editor-core",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-test",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.49"
|
||||
|
|
|
@ -3,7 +3,9 @@ name = "graphite-cli"
|
|||
version = "0.1.0"
|
||||
authors = ["Graphite Authors <contact@graphite.design>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
readme = "../../README.md"
|
||||
homepage = "https://www.graphite.design"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"name": "graphite-web-frontend",
|
||||
"version": "0.1.0",
|
||||
"description": "Graphite's web app frontend. Planned to be replaced by a Rust native GUI framework in the future.",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
[package]
|
||||
name = "wasm-wrapper"
|
||||
publish = false
|
||||
name = "graphite-wasm-wrapper"
|
||||
version = "0.1.0"
|
||||
authors = ["Graphite Authors <contact@graphite.design>"]
|
||||
edition = "2018"
|
||||
readme = "../../../README.md"
|
||||
homepage = "https://www.graphite.design"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
license = "Apache-2.0"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "rlib"]
|
||||
|
@ -12,14 +16,25 @@ crate-type = ["cdylib", "rlib"]
|
|||
default = ["console_error_panic_hook"]
|
||||
|
||||
[dependencies]
|
||||
wasm-bindgen = "0.2.72"
|
||||
graphite-editor-core = { path = "../../../core/editor" }
|
||||
|
||||
# The `console_error_panic_hook` crate provides better debugging of panics by
|
||||
# logging them with `console.error`. This is great for development, but requires
|
||||
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
||||
# code size when deploying.
|
||||
console_error_panic_hook = { version = "0.1.6", optional = true }
|
||||
graphite-editor-core = { path = "../../../core/editor" }
|
||||
wasm-bindgen = "0.2.72"
|
||||
|
||||
[dev-dependencies]
|
||||
wasm-bindgen-test = "0.3.22"
|
||||
|
||||
[package.metadata.wasm-pack.profile.dev]
|
||||
wasm-opt = false
|
||||
|
||||
[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
|
||||
debug-js-glue = true
|
||||
demangle-name-section = true
|
||||
dwarf-debug-info = true
|
||||
|
||||
[package.metadata.wasm-pack.profile.release]
|
||||
wasm-opt = ["-Os"]
|
||||
|
||||
[package.metadata.wasm-pack.profile.release.wasm-bindgen]
|
||||
debug-js-glue = false
|
||||
demangle-name-section = false
|
||||
dwarf-debug-info = false
|
||||
|
|
10
client/web/wasm/tests/web.rs
Normal file
10
client/web/wasm/tests/web.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
#![cfg(target_arch = "wasm32")]
|
||||
|
||||
use wasm_bindgen_test::*;
|
||||
|
||||
wasm_bindgen_test_configure!(run_in_browser);
|
||||
|
||||
#[wasm_bindgen_test]
|
||||
fn pass() {
|
||||
assert_eq!(1 + 1, 2);
|
||||
}
|
|
@ -3,7 +3,9 @@ name = "graphite-document-core"
|
|||
version = "0.1.0"
|
||||
authors = ["Graphite Authors <contact@graphite.design>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
readme = "../../README.md"
|
||||
homepage = "https://www.graphite.design"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
@ -3,6 +3,10 @@ name = "graphite-editor-core"
|
|||
version = "0.1.0"
|
||||
authors = ["Graphite Authors <contact@graphite.design>"]
|
||||
edition = "2018"
|
||||
readme = "../../README.md"
|
||||
homepage = "https://www.graphite.design"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
|
|
|
@ -3,7 +3,9 @@ name = "graphite-renderer-core"
|
|||
version = "0.1.0"
|
||||
authors = ["Graphite Authors <contact@graphite.design>"]
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
readme = "../../README.md"
|
||||
homepage = "https://www.graphite.design"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue