1.1.2 • Published 3 years ago

fs-img v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

作用:

一般用做PxLoader的预加载
可以把当前目录下的images下的所有的文件名 转成一个数组

使用

## 打开cmd cd到需要生成的目录
## blendImg  //你的自定义命令
blendImg images img.js imgList     //  自定义命令 当前目录下的images目录 输出文件名 数组名字 以空格分隔
blendImg images/toast toastimg.js toastImgList     //  自定义命令 当前目录下的images目录 输出文件名 数组名字 以空格分隔
也可直接 blendImg
在当前目录会生成一个img.js 内容就是需要的arr

1.在index.html 中引入imgList.js
2.在index.js中
    var loader = new PxLoader();
    imgList.map(function (v) {
        loader.addImage(v);
    })
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

5 years ago