JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q19619F
  • License ISC

Package Exports

  • mrp-info

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mrp-info) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MRP-INFO

获取斯凯mrp文件的信息和文件内容

使用

调用getMrpInfo或getMrpInfoFromFile函数即可得到对应mrp文件的信息和文件内容。

当获取信息失败时会抛出对应的错误,具体可以从typing/errors.d.ts中查看。

import fs from 'fs'
import { getMrpInfo } from 'mrp-info'

console.log(getMrpInfo(fs.readFileSync('<mrp filepath>')))

数据解压缩

使用gunzip选项可以将文件进行解压缩,解压缩之后的数据在文件的dataGuzip中。

const info = getMrpInfoFromFile('<mrp filepath>', { gunzip: true })
console.log(info.files[0].dataGuzip)