Git Product home page Git Product logo

ypackr's Introduction

静态资源打包工具(ypackr)使用说明

综述

ypackr 是专为移动 app 混合开发设计的 web 静态资源打包工具。

ypackr 通过比较两个 svn 版本的区别(目前还不支持 git),将静态资源项目打包为全量更新包、增量更新包,以及线上资源目录,同时生成版本信息 update.json。

运行环境

  • ypackr 基于 nodejs 实现,使用前请先安装 nodejs。
  • ypackr 依赖的 npm 模块需要联网安装,请确保连入互联网。
  • ypackr 依赖 svn 命令行工具,使用前请安装 svn 并确保环境变量 Path 中有相关目录。
  • ypackr 没有 svn 账户设置入口,使用前请确保 svn 已经保存了可用的账户名。
  • ypackr 为命令行工具,使用前请确保环境变量 Path 中有 ypackr 根目录。

安装

npm install -g ypackr

命令参数

ypackr 命令格式如下:

ypackr -p=${prefix} -c=${currentVersion} -l=${lastVersion} -r=${repositoryURL}

其中:

  • prefix 为输出目录,如果不设置,则输出于当前目录。
  • currentVersion 为当前发布版本的 svn 版本号。
  • lastVersion 为上一个版本的 svn 版本号。
  • repositoryURL 为 svn 版本库地址。

输出

ypackr 输出为一个 zip 压缩包,其中有如下文件或目录:

  • bundle.zip 新发布版本的全量更新包。
  • patch.zip 增量更新包,其中有新增和改动过的文件。
  • web 线上资源目录,供客户端或浏览器在不使用缓存时直接访问。
  • update.json 版本信息文件,其中以 json 格式记录了新版本和上一个版本的版本号。

ypackr's People

Contributors

yusangeng avatar

Stargazers

twistar avatar  avatar 挡不住的君文 avatar honkermail avatar  avatar  avatar Elio avatar  avatar  avatar José Rodrigues avatar Cesar Boaventura avatar khan avatar Master丶Bin avatar 蟹老板 avatar itfanr avatar  avatar chencong-hakka avatar zhangli avatar

Watchers

James Cloos avatar khan avatar

Forkers

vidding

ypackr's Issues

项目改名为ypackr

本项目原为本地使用项目,发布到npm时发现packr名字被占用,于是改为ypackr,命令行命令也改为ypackr,其他不变。

报错

我按照步骤来了一遍,报错了,错误如下:
D:\work\workDet\packr\packr>packr -c=${2} -l=${1} -r=${https://DESKTOP-D1SM9OQ/svn/testProj/}

D:\work\workDet\packr\packr>node D:\work\workDet\packr\packr\packr.js -c ${2} -l ${1} -r ${https://DESKTOP-D1SM9OQ/svn/testProj/}
module.js:340
throw err;
^

Error: Cannot find module './misc'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:289:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\work\workDet\packr\packr\lib\cp.js:7:12)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (D:\work\workDet\packr\packr\packr.js:13:10)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)

我看了下 lib下没有misc 这样的模块,请问这个怎么解决啊?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.