mt-resource-diff-patch

1.3.3 • Public • Published

前端资源包增量更新与补丁合并


resource-diff-patch

  1. 生成增量包
const { generatorPatchZip } = require('@mt/resource-diff-patch')
 
generatorPatchZip(
  '/xxx/test_1.0.0.zip',
  '/xxx/test_1.0.1.zip',
  '/xxx/patchs',
  'test_1.0.0_1.0.1.patch'
)
  .then((patchResourceZipPath) => {
    console.log(patchResourceZipPath)
  })
  .catch((e) => {
    console.log(e)
  })
  1. 打补丁到旧资源包
const { patchResource } = require('@mt/resource-diff-patch')
 
patchResource(
  '/Users/mifind/Desktop/test/test.js.zip',
  '/Users/mifind/Desktop/test/test.patch.zip',
  '/Users/mifind/Desktop/test',
  'test.new'
).then((res) => {
  console.log(res)
})
 

Package Sidebar

Install

npm i mt-resource-diff-patch

Weekly Downloads

0

Version

1.3.3

License

ISC

Unpacked Size

284 kB

Total Files

32

Last publish

Collaborators

  • mifind