@hckrnews/converter

中文文档
0.7.0发布于 2026/11/11MITES Module零依赖近 30 天下载 5773

Convert files

原始使用文档
文档目录4 节
  1. Installation
  2. Example usage
  3. Props
  4. Test the package.

@hckrnews/converter

Convert files.

If you want convert files, you can do it with this script.

Installation

npm install @hckrnews/converter

Debian/Ubuntu:

sudo apt install imagemagick ghostscript

Example usage

import Converter from '../src/converter.js';

const converter = Converter.create({
    file:  'test/xyz.pdf',
    output: 'output/',
    sync: true
});

const result = converter.convert();

Props

file: path to the file.

output: Output folder.

customConverter: name of the binary to run instead of cp (e.g. convert). It is executed without a shell and receives the input and output paths as arguments, so it must not contain flags or shell syntax.

Test the package.

npm test

This will run all the tests in the test folder with mocha.

If you only want to check the eslint rules, just run.

npm run lint

版本与发布记录

@hckrnews/converter 共发布 18 个版本,首次发布于 2020/12/22;过去 12 个月发布了 1 个版本。

版本发布日期距今
0.7.0latest2026/11/116 天前
0.6.02025/06/201.4 年前
0.5.52024/07/252 年前
0.5.42024/07/172 年前
0.5.22024/07/052 年前
0.5.12023/11/292 年前

关于 @hckrnews/converter 的常见问题

@hckrnews/converter 是什么?

Convert files

如何安装 @hckrnews/converter?

在项目目录运行 npm install @hckrnews/converter,或使用 pnpm add / yarn add / bun add。

@hckrnews/converter 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/hckrnews__converter 是否存在。

@hckrnews/converter 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@hckrnews/converter 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@hckrnews/converter 可以商用吗?

@hckrnews/converter 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@hckrnews/converter 的下载量有多少?

根据 npm 官方下载统计,@hckrnews/converter 在 2026/10/18 – 2026/11/16 这 30 天内被下载 5,773 次,日均约 192 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@hckrnews/converter 还在维护吗?

最新版本 0.7.0 发布于 2026/11/11(6 天前);至今共发布 18 个版本,其中过去 12 个月发布了 1 个;首次发布于 2020/12/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。