chore(Lazyload): improve dist

This commit is contained in:
chenjiahan 2020-11-30 20:30:40 +08:00
parent d3ca404f98
commit cafd50c9cd
3 changed files with 20 additions and 9 deletions

1
.gitignore vendored
View File

@ -10,7 +10,6 @@ package-lock.json
# dist file
es
esm
lib
dist
/site

View File

@ -10,4 +10,18 @@ yarn add @vant/lazyload
## Usage
```js
import { createApp } from 'vue';
import { LazyLoad } from '@vant/lazyload';
const app = createApp();
app.use(LazyLoad);
```
## API
see: https://github.com/hilongjw/vue-lazyload
## TODO
support TypeScript.

View File

@ -2,21 +2,19 @@
"name": "@vant/lazyload",
"version": "1.0.0",
"description": "",
"main": "lib/index.js",
"module": "esm/index.js",
"types": "lib/index.d.ts",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"files": [
"es",
"lib",
"types"
"dist"
],
"scripts": {
"dev": "babel src --out-dir esm --watch",
"build": "babel src --out-dir esm && BABEL_MODULE=commonjs babel src --out-dir lib",
"dev": "babel src --out-dir dist/esm --watch",
"build": "babel src --out-dir dist/esm && BABEL_MODULE=commonjs babel src --out-dir dist/cjs",
"release": "npm run build && release-it"
},
"license": "MIT",