34个版本
0.4.13 | 2023年6月3日 |
---|---|
0.4.9 | 2023年4月10日 |
0.4.6 | 2023年1月9日 |
0.4.3 | 2022年12月21日 |
0.3.0 | 2022年7月2日 |
#165 in 构建实用工具
每月22次下载
用于 rust-to-npm-cli
13KB
300 行
rust-to-npm
rust-to-npm的Rust库。
方法
use rust_to_npm:create_package;
fn main() {
// colocates a package.json that matches Cargo.toml 1:1
let package = create_package(None, "Cargo.toml");
println!("{:?}", package);
}
输出
{
"name": "rust-to-npm",
"version": "0.4.10",
"description": "ship a rust project to npm on all operating systems leveraging cargo.",
"main": "start.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "node ./pre-install.js",
"uninstall": "node ./uninstall.js"
},
"repository": {
"type": "git",
"url": "https://github.com/a11ywatch/rust-to-npm.git"
},
"keywords": ["rust-to-npm", "deploy-rust", "npm", "rust"],
"author": "Jeff Mendez",
"license": "MIT",
"bugs": {
"url": "https://github.com/a11ywatch/rust-to-npm/issues"
},
"homepage": "https://github.com/a11ywatch/rust-to-npm",
"files": [
"pre-install.js",
"start.js",
"uninstall.js",
"README.md",
"LICENSE"
]
}
依赖项
~0.5–1.1MB
~26K SLoC