npm
publish dir to npm
use PathBuf;
use ;
use constructor;
use info;
extern "C"
async
publish dir to npm
use std::path::PathBuf;
use aok::{Result, OK};
use static_init::constructor;
use tracing::info;
#[constructor(0)]
extern "C" fn init() {
loginit::init()
}
#[tokio::test]
async fn test() -> Result<()> {
let token = npm::token();
if token.is_empty() {
info!("npm token is empty");
} else {
let dir: PathBuf = env!("CARGO_MANIFEST_DIR").into();
let src = dir.join("tests").join("pkg");
info!("begin publish");
xerr::log!(npm::publish(&token, src).await);
}
info!("done");
OK
}