MIDI JSON Parser 项目教程

MIDI JSON Parser 项目教程

midi-json-parserThis module is parsing midi files into a human-readable JSON object.项目地址:https://gitcode.com/gh_mirrors/mi/midi-json-parser

1. 项目的目录结构及介绍

midi-json-parser/
├── dist/
│   ├── index.d.ts
│   ├── index.js
│   ├── index.js.map
│   ├── index.mjs
│   ├── index.mjs.map
│   ├── worker.d.ts
│   ├── worker.js
│   ├── worker.js.map
│   ├── worker.mjs
│   └── worker.mjs.map
├── src/
│   ├── index.ts
│   └── worker.ts
├── test/
│   ├── index.spec.ts
│   └── worker.spec.ts
├── .editorconfig
├── .gitignore
├── .npmrc
├── .prettierrc
├── LICENSE
├── package.json
├── README.md
└── tsconfig.json
  • dist/: 编译后的文件,包含 CommonJS 和 ES6 模块的版本。
  • src/: 源代码目录,包含主要的 TypeScript 文件。
  • test/: 测试文件目录,包含单元测试。
  • .editorconfig, .gitignore, .npmrc, .prettierrc: 项目配置文件。
  • LICENSE: 项目许可证。
  • package.json: 项目依赖和脚本配置。
  • README.md: 项目说明文档。
  • tsconfig.json: TypeScript 配置文件。

2. 项目的启动文件介绍

项目的启动文件位于 src/index.ts,这是项目的主入口文件。它导出了 MIDI 解析的主要功能,可以将 MIDI 数据解析为 JSON 格式。

// src/index.ts
export * from './worker';

3. 项目的配置文件介绍

  • package.json: 包含了项目的依赖、脚本和其他元数据。
{
  "name": "midi-json-parser",
  "version": "1.0.0",
  "description": "A parser for converting MIDI data to JSON.",
  "main": "dist/index.js",
  "module": "dist/index.mjs",
  "types": "dist/index.d.ts",
  "scripts": {
    "build": "rollup -c",
    "test": "jest"
  },
  "dependencies": {
    "midi-file-parser": "^1.0.0"
  },
  "devDependencies": {
    "@types/jest": "^26.0.0",
    "jest": "^26.0.0",
    "rollup": "^2.0.0",
    "typescript": "^4.0.0"
  }
}
  • tsconfig.json: TypeScript 编译配置文件。
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "moduleResolution": "node",
    "declaration": true,
    "outDir": "./dist",
    "strict": true
  },
  "include": ["src"]
}

这些配置文件确保了项目的正确编译和运行。

midi-json-parserThis module is parsing midi files into a human-readable JSON object.项目地址:https://gitcode.com/gh_mirrors/mi/midi-json-parser

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

诸余煦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值