mirror of
https://gitee.com/vant-contrib/vant.git
synced 2026-07-07 15:11:06 +08:00
Compare commits
3 Commits
8d1d029f5d
...
2bfbe5f86e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bfbe5f86e | ||
|
|
b456459249 | ||
|
|
d65714601e |
@ -29,17 +29,17 @@
|
||||
"author": "chenjiahan",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^8.1.0",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/inquirer": "^8.1.3",
|
||||
"release-it": "^13.0.0",
|
||||
"release-it": "^14.11.6",
|
||||
"typescript": "4.x"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^3.0.0",
|
||||
"chalk": "^4.1.2",
|
||||
"consola": "^2.11.3",
|
||||
"fast-glob": "^3.2.4",
|
||||
"fs-extra": "^8.1.0",
|
||||
"inquirer": "^7.0.6"
|
||||
"fs-extra": "^10.0.0",
|
||||
"inquirer": "^8.0.0"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
/**
|
||||
* @babel/preset-typescript 不支持编译 Vue 文件中的 ts 代码
|
||||
* 通过手动添加 @babel/plugin-transform-typescript 的方式来解决这个问题
|
||||
* see: https://github.com/babel/babel-loader/pull/738
|
||||
*/
|
||||
|
||||
const { readFileSync } = require('fs');
|
||||
const { declare } = require('@babel/helper-plugin-utils');
|
||||
|
||||
module.exports = declare(() => ({
|
||||
overrides: [
|
||||
{
|
||||
test: (filePath) => {
|
||||
if (/\.vue$/.test(filePath)) {
|
||||
const template = readFileSync(filePath, { encoding: 'utf8' });
|
||||
return (
|
||||
template.includes('lang="ts"') || template.includes("lang='ts'")
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
plugins: [require('@babel/plugin-transform-typescript')],
|
||||
},
|
||||
],
|
||||
}));
|
||||
@ -17,7 +17,6 @@ module.exports = function (api, options) {
|
||||
},
|
||||
],
|
||||
require.resolve('@babel/preset-typescript'),
|
||||
require('./babel-preset-vue-ts.cjs'),
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
|
||||
@ -43,7 +43,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/helper-plugin-utils": "^7.14.5",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@docsearch/css": "3.0.0-alpha.41",
|
||||
|
||||
@ -35,7 +35,7 @@ function runCommand(
|
||||
function eslint() {
|
||||
return runCommand(
|
||||
'eslint',
|
||||
['./src', '--fix', '--ext', [SCRIPT_EXTS, '.md'].join(',')],
|
||||
['./src', '--fix', '--ext', SCRIPT_EXTS.join(',')],
|
||||
{
|
||||
start: 'Running eslint...',
|
||||
succeed: 'ESLint Passed.',
|
||||
|
||||
1
packages/vant-cli/src/module.d.ts
vendored
1
packages/vant-cli/src/module.d.ts
vendored
@ -5,4 +5,3 @@ declare module 'clean-css';
|
||||
declare module 'release-it';
|
||||
declare module 'conventional-changelog';
|
||||
declare module '@vant/markdown-vetur';
|
||||
declare module '@babel/helper-plugin-utils';
|
||||
|
||||
@ -4,7 +4,6 @@ module.exports = {
|
||||
'airbnb-base',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier',
|
||||
'plugin:markdown/recommended',
|
||||
],
|
||||
|
||||
parserOptions: {
|
||||
|
||||
@ -10,16 +10,15 @@
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-eslint-config",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.32.0",
|
||||
"@typescript-eslint/parser": "^4.33.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
||||
"@typescript-eslint/parser": "5.3.1",
|
||||
"eslint-config-airbnb-base": "^14.2.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.24.0",
|
||||
"eslint-plugin-markdown": "^2.2.1",
|
||||
"eslint-plugin-vue": "^7.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0",
|
||||
"eslint": "^8.0.0",
|
||||
"typescript": "4.x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-icons",
|
||||
"devDependencies": {
|
||||
"release-it": "^13.6.2"
|
||||
"release-it": "^14.11.6"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
||||
@ -1 +0,0 @@
|
||||
lib
|
||||
@ -1,27 +0,0 @@
|
||||
# @vant/lazyload
|
||||
|
||||
This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
|
||||
## Install
|
||||
|
||||
```shell
|
||||
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.
|
||||
@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [['@vant/cli/preset.cjs', { loose: true }]],
|
||||
};
|
||||
@ -1,42 +0,0 @@
|
||||
{
|
||||
"name": "@vant/lazyload",
|
||||
"version": "1.4.0",
|
||||
"description": "This is a fork of vue-lazyload",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"types"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "rollup --config rollup.config.js --watch",
|
||||
"build": "rollup --config rollup.config.js",
|
||||
"release": "pnpm build && release-it",
|
||||
"prepare": "pnpm build"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-lazyload",
|
||||
"dependencies": {
|
||||
"@vant/use": "^1.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vue": "3.x",
|
||||
"@vue/runtime-core": "3.x",
|
||||
"@vant/cli": "workspace:*",
|
||||
"@rollup/plugin-babel": "^5.2.1",
|
||||
"@rollup/plugin-node-resolve": "^10.0.0",
|
||||
"release-it": "^14.2.2",
|
||||
"rollup": "^2.33.3"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
"tag": false,
|
||||
"commitMessage": "release: @vant/lazyload ${version}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
import path from 'path';
|
||||
import babel from '@rollup/plugin-babel';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
input: path.join(__dirname, 'src', 'index.js'),
|
||||
output: [
|
||||
{
|
||||
dir: 'dist/cjs',
|
||||
format: 'cjs',
|
||||
},
|
||||
{
|
||||
dir: 'dist/esm',
|
||||
format: 'esm',
|
||||
},
|
||||
],
|
||||
external: ['vue', '@vant/use'],
|
||||
plugins: [
|
||||
babel({ babelHelpers: 'bundled', extensions: ['.js', '.ts'] }),
|
||||
nodeResolve(),
|
||||
],
|
||||
};
|
||||
@ -14,7 +14,7 @@
|
||||
"highlight.js": "^10.7.1",
|
||||
"loader-utils": "^2.0.0",
|
||||
"markdown-it": "^12.0.4",
|
||||
"markdown-it-anchor": "^7.1.0",
|
||||
"markdown-it-anchor": "^8.0.0",
|
||||
"transliteration": "^2.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"fast-glob": "^3.2.2",
|
||||
"fs-extra": "^9.0.0"
|
||||
"fs-extra": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^8.1.0"
|
||||
"@types/fs-extra": "^9.0.13"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "@vant/popperjs",
|
||||
"version": "1.1.0",
|
||||
"description": "Precompiled popperjs core",
|
||||
"description": "Pre-compiled popperjs core",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
|
||||
@ -45,7 +45,6 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@vant/icons": "^1.7.1",
|
||||
"@vant/lazyload": "^1.4.0",
|
||||
"@vant/popperjs": "^1.1.0",
|
||||
"@vant/use": "^1.3.2"
|
||||
},
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Lazyload } from '@vant/lazyload';
|
||||
import { Lazyload } from './vue-lazyload';
|
||||
|
||||
export default Lazyload;
|
||||
export { Lazyload };
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { App } from 'vue';
|
||||
import type { App } from 'vue';
|
||||
|
||||
declare type ListenEvent =
|
||||
| 'scroll'
|
||||
@ -1,3 +1,7 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
*/
|
||||
|
||||
import Lazy from './lazy';
|
||||
import LazyComponent from './lazy-component';
|
||||
import LazyContainer from './lazy-container';
|
||||
@ -6,5 +6,10 @@
|
||||
"emitDeclarationOnly": true
|
||||
},
|
||||
"include": ["es/**/*", "lib/**/*"],
|
||||
"exclude": ["node_modules", "**/test/**/*", "**/demo/**/*"]
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/test/**/*",
|
||||
"**/demo/**/*",
|
||||
"**/vue-lazyload/*"
|
||||
]
|
||||
}
|
||||
|
||||
741
pnpm-lock.yaml
generated
741
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user