Browse Source

add README for crates.io publish (#1952)

This Pull Request closes #1948.

It changes the following:

- set `readme` in `boa_engine` so `README.md` will be published to crates.io
- remove unnecessary `exclude` field from `Cargo.toml` in all apps

I was unsure whether using a path outside of the workspace root was allowed for `readme` since it [doesn't get included in the release tarball](https://github.com/rust-lang/cargo/issues/5911), but this exact path is used by [juniper](https://github.com/graphql-rust/juniper/blob/master/juniper/Cargo.toml#L13) and [seems to work there](https://crates.io/crates/juniper). I believe `cargo publish` does a bit more than just uploading the tarball, including pulling the `readme` from any arbitrary path.

The default behaviour of `cargo package`/`cargo publish` if neither `exclude` or `include` is specified is to include all files from the package root, excluding

- dotfiles
- .gitignore'd files
- subpackages (any subdirectory with a `Cargo.toml` file)
- the `/target` directory

There's no need to explicitly exclude files from the parent directory since they're already excluded by default. This can be verified by running `cargo package --list` inside any workspace app:

```plain
$ cd boa_wasm
$ cargo package --list
.gitignore
Cargo.toml
Cargo.toml.orig
src/lib.rs
```

You can read more [here](https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields).
pull/1958/head
Aaron Ross 3 years ago
parent
commit
520b81ea66
  1. 18
      boa_cli/Cargo.toml
  2. 19
      boa_engine/Cargo.toml
  3. 18
      boa_gc/Cargo.toml
  4. 18
      boa_interner/Cargo.toml
  5. 20
      boa_profiler/Cargo.toml
  6. 18
      boa_tester/Cargo.toml
  7. 18
      boa_unicode/Cargo.toml
  8. 18
      boa_wasm/Cargo.toml

18
boa_cli/Cargo.toml

@ -10,24 +10,6 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"]
categories = ["command-line-utilities"] categories = ["command-line-utilities"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
default-run = "boa" default-run = "boa"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[dependencies] [dependencies]
boa_engine = { path = "../boa_engine", features = ["deser", "console"], version = "0.14.0" } boa_engine = { path = "../boa_engine", features = ["deser", "console"], version = "0.14.0" }

19
boa_engine/Cargo.toml

@ -9,24 +9,7 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "js", "compiler", "lexer", "parser"] keywords = ["javascript", "js", "compiler", "lexer", "parser"]
categories = ["parser-implementations", "compilers"] categories = ["parser-implementations", "compilers"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [ readme = "../README.md"
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[features] [features]
profiler = ["boa_profiler/profiler"] profiler = ["boa_profiler/profiler"]

18
boa_gc/Cargo.toml

@ -9,24 +9,6 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "js", "garbage", "memory"] keywords = ["javascript", "js", "garbage", "memory"]
categories = ["command-line-utilities"] categories = ["command-line-utilities"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[dependencies] [dependencies]
gc = { version = "0.4.1", features = ["derive"] } gc = { version = "0.4.1", features = ["derive"] }

18
boa_interner/Cargo.toml

@ -9,24 +9,6 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "js", "string", "interner"] keywords = ["javascript", "js", "string", "interner"]
categories = ["data-structures"] categories = ["data-structures"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[dependencies] [dependencies]
string-interner = "0.14.0" string-interner = "0.14.0"

20
boa_profiler/Cargo.toml

@ -9,28 +9,10 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "js", "compiler", "profiler"] keywords = ["javascript", "js", "compiler", "profiler"]
categories = ["development-tools::profiling"] categories = ["development-tools::profiling"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[features] [features]
profiler = ["measureme", "once_cell"] profiler = ["measureme", "once_cell"]
[dependencies] [dependencies]
measureme = { version = "10.0.0", optional = true } measureme = { version = "10.0.0", optional = true }
once_cell = { version = "1.10.0", optional = true } once_cell = { version = "1.10.0", optional = true }

18
boa_tester/Cargo.toml

@ -9,24 +9,6 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "ECMASCript", "compiler", "test262", "tester"] keywords = ["javascript", "ECMASCript", "compiler", "test262", "tester"]
categories = ["command-line-utilites"] categories = ["command-line-utilites"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[dependencies] [dependencies]
boa_engine = { path = "../boa_engine", version = "0.14.0" } boa_engine = { path = "../boa_engine", version = "0.14.0" }

18
boa_unicode/Cargo.toml

@ -9,24 +9,6 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "compiler", "lexer", "parser", "unicode"] keywords = ["javascript", "compiler", "lexer", "parser", "unicode"]
categories = ["parsing"] categories = ["parsing"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[dependencies] [dependencies]
unicode-general-category = "0.5.1" unicode-general-category = "0.5.1"

18
boa_wasm/Cargo.toml

@ -9,24 +9,6 @@ repository = "https://github.com/boa-dev/boa"
keywords = ["javascript", "compiler", "lexer", "parser", "js"] keywords = ["javascript", "compiler", "lexer", "parser", "js"]
categories = ["parser-implementations", "wasm", "compilers"] categories = ["parser-implementations", "wasm", "compilers"]
license = "Unlicense/MIT" license = "Unlicense/MIT"
exclude = [
"../.vscode/*",
"../.editorconfig",
"../test262/*",
"../node_modules/*",
"../target/*",
"../dist/*",
"../.github/*",
"../assets/*",
"../docs/*",
"../*.js",
"../test_ignore.txt",
"../yarn.lock",
"../package.json",
"../index.html",
"../tests/*",
"../.github/*",
]
[dependencies] [dependencies]
boa_engine = { path = "../boa_engine", features = ["console"], version = "0.14.0" } boa_engine = { path = "../boa_engine", features = ["console"], version = "0.14.0" }

Loading…
Cancel
Save