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 # dist file
es es
esm
lib lib
dist dist
/site /site

View File

@ -10,4 +10,18 @@ yarn add @vant/lazyload
## Usage ## 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 see: https://github.com/hilongjw/vue-lazyload
## TODO
support TypeScript.

View File

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