Socket
Socket
Sign inDemoInstall

yu-img-upload

Package Overview
Dependencies
3
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yu-img-upload

a simple images upload plugin with preview


Version published
Weekly downloads
1
Maintainers
1
Install size
2.53 MB
Created
Weekly downloads
 

Readme

Source

这是一个简单的自用书写插件发布到npm用的包

安装步骤

1.请确保全局安装了 webpack npm

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 说明文档(本文件)

Keywords

FAQs

Last updated on 09 Nov 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc