rust-to-npm

Crates.iorust-to-npm
lib.rsrust-to-npm
version0.4.13
sourcesrc
created_at2022-06-30 22:19:30.467066
updated_at2023-06-03 23:09:52.647201
descriptiondeploy a rust project to npm in one command.
homepagehttps://github.com/a11ywatch/rust-to-npm
repositoryhttps://github.com/a11ywatch/rust-to-npm
max_upload_size
id616747
size12,374
Jeff Mendez (j-mendez)

documentation

README

rust-to-npm

The Rust crate for rust-to-npm.

Methods

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);
}

Output:

{
  "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"
  ]
}
Commit count: 36

cargo fmt