Package Exports
- clx-h5psd
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 (clx-h5psd) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Converting PSD files into mobile page
PSD 转换成移动端页面的工具。
功能
- 自动导出图层的 PNG 文件;
- 导出 PNG 用 hash 命名,避免出现重复素材;
- 自动判断背景图;
- 可以使用自定义模板。( 使用 jdists 编写)。
预制模板
tpl/page.html标准模板tpl/auto-bottom.html自动计算需要居底的图层
效果
输出的网页

PSD 设计稿

使用
PSD 准备
- 模式 RGB 颜色、8 位通道;
- 合并和栅格化实际的图层;
- 隐藏不需要导出的图层。
- 使用特殊字体的文本需要栅格化;
- 标签支持'<p>','<strong>','<b>','<i>','<a>','<button>';需要在PSD图层增加对应标签标识。
安装
$ npm install clx-h5psd [-g]
命令行
Usage:
h5psd <input list> [options]
Options:
-v, --version Output h5psd version.
-o, --output Output directory (default input directory).
-s, --images Images directory (default "images").
-l, --layer Export "<name>.layer" file (default false).
-n, --name Enable the "name" attribute (default false).
-t, --template Page jdists template file.License
MIT © zswang