yu-img-upload
Advanced tools
Comparing version 1.0.4 to 1.0.5
(function(a){function b(c){if(d[c])return d[c].exports;var e=d[c]={i:c,l:!1,exports:{}};return a[c].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c=window.webpackJsonp;window.webpackJsonp=function(d,f,g){for(var h,j,k,l=0,i=[];l<d.length;l++)j=d[l],e[j]&&i.push(e[j][0]),e[j]=0;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(a[h]=f[h]);for(c&&c(d,f,g);i.length;)i.shift()();if(g)for(l=0;l<g.length;l++)k=b(b.s=g[l]);return k};var d={},e={1:0};b.e=function(a){function c(){h.onerror=h.onload=null,clearTimeout(i);var b=e[a];0!==b&&(b&&b[1](new Error("Loading chunk "+a+" failed.")),e[a]=void 0)}var d=e[a];if(0===d)return new Promise(function(a){a()});if(d)return d[2];var f=new Promise(function(b,c){d=e[a]=[b,c]});d[2]=f;var g=document.getElementsByTagName("head")[0],h=document.createElement("script");h.type="text/javascript",h.charset="utf-8",h.async=!0,h.timeout=1.2e5,b.nc&&h.setAttribute("nonce",b.nc),h.src=b.p+"js/"+a+".js";var i=setTimeout(c,1.2e5);return h.onerror=h.onload=c,g.appendChild(h),f},b.m=a,b.c=d,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b.oe=function(a){throw console.error(a),a}})([]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgNjNhNDNkY2UyOTgwNGEzNTE5NWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IllBQ0EsY0F5Q0EsSUFDQSxpQkFHQSxtQkFDQSxDQUNBLElBQ0EsS0FJQSwyQ0FHQ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ihlcnIpIHsgY29uc29sZS5lcnJvcihlcnIpOyB0aHJvdyBlcnI7IH07XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gd2VicGFjay9ib290c3RyYXAgM2I3MWY1ZTRkNWVjNDM2ZTU5MmEiXSwic291cmNlUm9vdCI6IiJ9 |
{ | ||
"name": "yu-img-upload", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "a simple images upload plugin with preview", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,14 +0,71 @@ | ||
### npm install --save yu-img-upload | ||
### import imgUpload from 'yu-img-upload' | ||
# 这是一个简单的自用书写插件发布到npm用的包 | ||
@param {object} option - one entry param to function yu-img-upload | ||
@param {boolean} [option.popup] - accept true || false 是否用插件带的弹出框 默认用 | ||
@param {boolean} [option.multiple] - accept true || false 是否支持多选 默认支持 | ||
@param {string} [option.name] - name input的name属性 默认名为file | ||
@param {obejct} [option.target] target render DOM 需要渲染的dom | ||
@param {number} [option.maxnum = 5] - max upload number 最大选择图片数量 (multiple为false的时候插件会强制maxnum为1) 默认为5 | ||
@param {number} [option.maxsize = 1] - max upload image size 选择图片最大的尺寸 单位M 默认1M | ||
### 安装步骤 | ||
1.请确保全局安装了 webpack npm | ||
* this package is depend on jquery & it's already mixin it | ||
* this package is mixin yu-popup(https://www.npmjs.com/package/yu-popup) | ||
2.下载克隆此工程 | ||
3.npm install | ||
4.npm run dev (开发环境) npm run build (发布环境) | ||
* 请在lib目录下的脚本顶部加上 module.exports = | ||
(因为webpack打包出来的文件没有export,而是一个大的闭包。 | ||
又因为有图片字体等文件,插件比较丰富,所以需要webpack打包,期待更好的处理方法, | ||
简单的纯脚本plugin可以参考我另一个脚手架:babel-cli-plugin) | ||
### 目录结构 | ||
> `src 开发环境` | ||
>> css 里面app.scss用来做为example的样式,plugin.scss是plugin的样式 | ||
>> js 里面app.js用来做为example的脚本,plugin.js是plugin的脚本 | ||
>> ... 其他类如IMG等等文件夹 | ||
>> template.html 主模板/页面 | ||
> `dist 发布环境 通常是演示文件` | ||
>> ... 产出文件 index.html为主入口 | ||
> `lib 发布NPM包 请在脚本最前面加上 module.exports = ` | ||
> node_modules 模块包 | ||
> .gitignore git 忽略文件 | ||
> index.js npm官方入口,可以在package.json中配置 | ||
> .babelrc babel配置文件 | ||
> package.json 包信息 | ||
> postcss.config.js postcss配置文件 | ||
> webpack.config.js webpack配置文件 | ||
> README.md 说明文档(本文件) | ||
### webpack 配置 | ||
总体:热加载(不含组件热加载),全局挂载,自动清理产出文件夹,区分处理开发和发布环境 | ||
html:html模板引擎,svg行内挂载 | ||
css: less sass 分离样式表 自动补全前缀hack 支持css4(与less sass 冲突 选择性使用) | ||
js: 支持es6 typescript 代码分离 提取公共模块 丑化 | ||
图片:压缩 base64编码 | ||
字体:压缩 | ||
### npm包说明 | ||
* devDependencies 为开发的配置项 | ||
* dependencies 为项目的配置项 现包括jquery(已在webpack全局挂载),font-awesome,lodash | ||
@@ -248,3 +248,2 @@ /** | ||
* @description 初始化 | ||
* @returns {boolean} | ||
*/ | ||
@@ -251,0 +250,0 @@ init(){ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
743747
72
2548