package-json 0.5.0

package.json manager for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::collections::HashMap;

pub fn main() -> String {
  String::from("index.js")
}

/// see https://docs.npmjs.com/cli/v8/configuring-npm/package-json#default-values
pub fn scripts() -> HashMap<String, String> {
  HashMap::from([
    ("start".to_owned(), "node server.js".to_owned()),
    ("install".to_owned(), "node-gyp rebuild".to_owned()),
  ])
}

pub fn r#type() -> String {
  String::from("commonjs")
}