7 releases

0.1.7 Oct 18, 2024
0.1.6 Sep 5, 2024
0.1.5 Aug 17, 2024
0.1.4 Jun 13, 2024

#143 in #site


Used in 2 crates

MulanPSL-2.0

26KB
457 lines

npm

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");
    let package_json = src.join("package.json");
    info!("begin publish");
    xerr::log!(npm::publish(&token, src, &package_json).await);
  }
  info!("done");
  OK
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Dependencies

~9–22MB
~338K SLoC