chore: update Node dependencies

* and get rid of Taobao NPM registry.
* I used it because I was blocked from official repo by npmjs for
  whatever reason.
This commit is contained in:
Peter Cai 2020-06-25 19:45:22 +08:00
parent d6df7147bc
commit 24f8b36aff
No known key found for this signature in database
GPG Key ID: 71F5FB4E4F3FD54F
3 changed files with 1035 additions and 1264 deletions

View File

@ -71,7 +71,7 @@ fn generate_hljs_loader(config: &serde_json::Value) {
}).collect::<String>(); }).collect::<String>();
let js_code = format!( let js_code = format!(
"const hljs = require(\\\"highlight.js/lib/highlight.js\\\");\n{}module.exports = hljs;", "const hljs = require(\\\"highlight.js/lib/core\\\");\n{}module.exports = hljs;",
highlight_lang); highlight_lang);
let rs_code = fs::read_to_string("./src/hljs_tpl.rs").unwrap(); let rs_code = fs::read_to_string("./src/hljs_tpl.rs").unwrap();
let rs_code = format!("#[wasm_bindgen(inline_js = \"{}\")]\n{}", js_code, rs_code); let rs_code = format!("#[wasm_bindgen(inline_js = \"{}\")]\n{}", js_code, rs_code);
@ -79,4 +79,4 @@ fn generate_hljs_loader(config: &serde_json::Value) {
let mut out_file = fs::File::create(out_path.join("load_hljs.rs")).unwrap(); let mut out_file = fs::File::create(out_path.join("load_hljs.rs")).unwrap();
out_file.write_all(rs_code.as_bytes()).unwrap(); out_file.write_all(rs_code.as_bytes()).unwrap();
out_file.sync_data().unwrap(); out_file.sync_data().unwrap();
} }

2289
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,8 +17,8 @@
}, },
"homepage": "https://github.com/PeterCxy/paprika#readme", "homepage": "https://github.com/PeterCxy/paprika#readme",
"devDependencies": { "devDependencies": {
"@wasm-tool/wasm-pack-plugin": "^1.2.0", "@wasm-tool/wasm-pack-plugin": "^1.3.1",
"highlight.js": "^9.18.1", "highlight.js": "^10.1.1",
"webpack": "^4.42.1" "webpack": "^4.43.0"
} }
} }