Skip to content

Commit

Permalink
Merge pull request #33 from daxiazilong/develop
Browse files Browse the repository at this point in the history
npm publish
  • Loading branch information
daxiazilong authored Dec 29, 2021
2 parents 141d140 + d5d63fa commit 85e1052
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
15 changes: 15 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
example/
node_modules/
test/
debug/
scripts/
.gitignore
.eslintignore
.eslintrc.json
.stylelintignore
.stylelintrc.json
.npmignore
yarn.lock
*.log
.DS_Store
.cache
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ An image preview plugin for mobile web application.
4. 🍂 Based webgl.

### How to use it:
There are two ways:
#### 1. Copy release
There are three ways:
#### 1. npm install
`npm i @daxiazilong/image-preview`
#### 2. Copy release
* The `release/image-preview` directory is built for different module-system , include AMD,CommonJS,ES6,UMD,IIFE. You can choose one adapt to your project.
#### 2.Install:
#### 3.Install:
* Clone it ,then `npm i & npm run build`
* For different module-sysetem:
* The `release/image-preview` directory is built for different module-system , include AMD,CommonJS,ES6,UMD,IIFE. You can choose one adapt to your project.
Expand All @@ -32,6 +34,10 @@ There are two ways:
```javascript
import {ImagePreview} from 'js/image-preview-esm.js'
```
or if installed in node_modules
```javascript
import {ImagePreview} from '@daxiazilong/image-preview'
```
#### usage:
html:
```html
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "image-preview",
"version": "2.1.1",
"description": "image-preview",
"name": "@daxiazilong/image-preview",
"version": "2.1.3",
"description": "preview image on web page。rotate,zoom.etc. 移动端JS 图片预览 插件 支持 预览图片,旋转,放大(双指/双击)。",
"keywords": ["image preview", "viewer", "preview image"],
"main": "release/image-preview/image-preview-cjs-min.js",
"module": "release/image-preview/image-preview-esm-min.js",
"scripts": {
"start": "webpack serve --open Chrome.exe --mode=development",
"build": "node scripts/beforeBuild.js && npm run genModule",
Expand Down

0 comments on commit 85e1052

Please sign in to comment.