mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
Merge branch 'dev' into next
This commit is contained in:
commit
e27efdad0d
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install lint-staged
|
||||
npx --no-install nano-staged
|
||||
|
5
LICENSE
5
LICENSE
@ -1,4 +1,7 @@
|
||||
Copyright 2016-present Youzan
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
"build": "pnpm --dir ./packages/vant build",
|
||||
"build:site": "pnpm --dir ./packages/vant build:site"
|
||||
},
|
||||
"lint-staged": {
|
||||
"nano-staged": {
|
||||
"*.md": "prettier --write",
|
||||
"*.{ts,tsx,js,vue,less}": "prettier --write",
|
||||
"*.{ts,tsx,js,vue}": "eslint --fix",
|
||||
@ -22,7 +22,7 @@
|
||||
"@vant/stylelint-config": "workspace:*",
|
||||
"eslint": "^8.2.0",
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^12.1.2",
|
||||
"nano-staged": "^0.8.0",
|
||||
"prettier": "^2.5.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"stylelint": "^13.13.1"
|
||||
|
10
packages/create-vant-cli-app/LICENSE
Normal file
10
packages/create-vant-cli-app/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -20,11 +20,11 @@
|
||||
"author": "",
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"pre-commit": "nano-staged",
|
||||
"commit-msg": "vant-cli commit-lint"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"nano-staged": {
|
||||
"*.{ts,tsx,js,jsx,vue}": "eslint --fix",
|
||||
"*.{vue,css,less,scss}": "stylelint --fix"
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install lint-staged
|
||||
npx --no-install nano-staged
|
||||
|
@ -22,7 +22,7 @@
|
||||
"test:coverage": "open test/coverage/index.html"
|
||||
},
|
||||
"author": "",
|
||||
"lint-staged": {
|
||||
"nano-staged": {
|
||||
"*.md": "prettier --write",
|
||||
"*.{ts,tsx,js,vue,less,scss}": "prettier --write",
|
||||
"*.{ts,tsx,js,vue}": "eslint --fix",
|
||||
|
@ -33,15 +33,15 @@
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/inquirer": "^8.1.3",
|
||||
"release-it": "^14.11.6",
|
||||
"typescript": "~4.5.2"
|
||||
"release-it": "^15.1.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.2",
|
||||
"consola": "^2.11.3",
|
||||
"fast-glob": "^3.2.4",
|
||||
"fs-extra": "^10.0.0",
|
||||
"inquirer": "^8.0.0"
|
||||
"inquirer": "^8.0.0",
|
||||
"picocolors": "^1.0.0"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import fs from 'fs-extra';
|
||||
import glob from 'fast-glob';
|
||||
import chalk from 'chalk';
|
||||
import color from 'picocolors';
|
||||
import consola from 'consola';
|
||||
import { prompt } from 'inquirer';
|
||||
import { sep, join } from 'path';
|
||||
@ -64,7 +64,7 @@ export class VanGenerator {
|
||||
|
||||
writing() {
|
||||
console.log();
|
||||
consola.info(`Creating project in ${chalk.green(this.outputDir)}\n`);
|
||||
consola.info(`Creating project in ${color.green(this.outputDir)}\n`);
|
||||
|
||||
// see https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
|
||||
const templatePath = join(GENERATOR_DIR, this.inputs.vueVersion).replace(
|
||||
@ -99,16 +99,16 @@ export class VanGenerator {
|
||||
fs.writeFileSync(to, content);
|
||||
|
||||
const name = to.replace(this.outputDir + sep, '');
|
||||
consola.success(`${chalk.green('create')} ${name}`);
|
||||
consola.success(`${color.green('create')} ${name}`);
|
||||
}
|
||||
|
||||
end() {
|
||||
const { name } = this.inputs;
|
||||
|
||||
console.log();
|
||||
consola.success(`Successfully created ${chalk.yellow(name)}.`);
|
||||
consola.success(`Successfully created ${color.yellow(name)}.`);
|
||||
consola.success(
|
||||
`Run ${chalk.yellow(
|
||||
`Run ${color.yellow(
|
||||
`cd ${name} && git init && yarn && yarn dev`
|
||||
)} to start development!`
|
||||
);
|
||||
|
10
packages/vant-area-data/LICENSE
Normal file
10
packages/vant-area-data/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -37,8 +37,8 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.14.29",
|
||||
"release-it": "^14.2.2",
|
||||
"typescript": "~4.5.2"
|
||||
"release-it": "^15.1.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
10
packages/vant-cli/LICENSE
Normal file
10
packages/vant-cli/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -47,7 +47,7 @@ Please add the followed config to `package.json` file.
|
||||
"release": "vant-cli release",
|
||||
"build-site": "vant-cli build-site"
|
||||
},
|
||||
"lint-staged": {
|
||||
"nano-staged": {
|
||||
"*.md": "prettier --write",
|
||||
"*.{ts,tsx,js,vue,less,scss}": "prettier --write",
|
||||
"*.{ts,tsx,js,vue}": "eslint --fix",
|
||||
|
@ -43,7 +43,7 @@ pnpm add @vant/cli -D
|
||||
"release": "vant-cli release",
|
||||
"build-site": "vant-cli build-site"
|
||||
},
|
||||
"lint-staged": {
|
||||
"nano-staged": {
|
||||
"*.md": "prettier --write",
|
||||
"*.{ts,tsx,js,vue,less,scss}": "prettier --write",
|
||||
"*.{ts,tsx,js,vue}": "eslint --fix",
|
||||
|
@ -1,5 +1,15 @@
|
||||
# 更新日志
|
||||
|
||||
## v4.0.3
|
||||
|
||||
`2022-07-02`
|
||||
|
||||
- 新增 `build.bundleOptions` 配置项
|
||||
- 新增 `css.removeSourceFile` 配置项
|
||||
- 修复编译后的 script setup 中,引用的组件不生效的问题
|
||||
- 移除未使用的 esm bundle
|
||||
- 移除未使用的 ssr.js 文件
|
||||
|
||||
## v4.0.2
|
||||
|
||||
`2022-05-14`
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/cli",
|
||||
"version": "4.0.2",
|
||||
"version": "4.0.3",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
@ -61,8 +61,7 @@
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.3",
|
||||
"@vue/babel-plugin-jsx": "^1.1.1",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"chalk": "^4.1.2",
|
||||
"commander": "^8.3.0",
|
||||
"commander": "^9.3.0",
|
||||
"consola": "^2.15.3",
|
||||
"conventional-changelog": "^3.1.24",
|
||||
"esbuild": "^0.14.29",
|
||||
@ -78,17 +77,18 @@
|
||||
"jest-canvas-mock": "^2.3.1",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"less": "^4.1.2",
|
||||
"lint-staged": "^12.1.2",
|
||||
"markdown-it": "^12.2.0",
|
||||
"markdown-it-anchor": "^8.4.1",
|
||||
"ora": "^6.0.1",
|
||||
"nano-staged": "^0.8.0",
|
||||
"nanospinner": "^1.1.0",
|
||||
"picocolors": "^1.0.0",
|
||||
"postcss": "^8.3.11",
|
||||
"postcss-load-config": "^3.1.0",
|
||||
"prettier": "^2.5.0",
|
||||
"release-it": "^14.11.6",
|
||||
"release-it": "^15.1.1",
|
||||
"stylelint": "^13.0.0",
|
||||
"transliteration": "^2.2.0",
|
||||
"typescript": "^4.5.2",
|
||||
"typescript": "^4.7.4",
|
||||
"vite": "^2.9.0",
|
||||
"vite-plugin-html": "^2.1.1",
|
||||
"vite-plugin-md": "^0.11.4",
|
||||
|
@ -1,25 +1,26 @@
|
||||
import { Command } from 'commander';
|
||||
|
||||
import {
|
||||
dev,
|
||||
lint,
|
||||
test,
|
||||
clean,
|
||||
build,
|
||||
release,
|
||||
changelog,
|
||||
buildSite,
|
||||
commitLint,
|
||||
cliVersion,
|
||||
} from './index.js';
|
||||
import { cliVersion } from './index.js';
|
||||
|
||||
const program = new Command();
|
||||
|
||||
program.version(`@vant/cli ${cliVersion}`);
|
||||
|
||||
program.command('dev').description('Run dev server').action(dev);
|
||||
program
|
||||
.command('dev')
|
||||
.description('Run dev server')
|
||||
.action(async () => {
|
||||
const { dev } = await import('./commands/dev.js');
|
||||
return dev();
|
||||
});
|
||||
|
||||
program.command('lint').description('Run eslint and stylelint').action(lint);
|
||||
program
|
||||
.command('lint')
|
||||
.description('Run eslint and stylelint')
|
||||
.action(async () => {
|
||||
const { lint } = await import('./commands/lint.js');
|
||||
return lint();
|
||||
});
|
||||
|
||||
program
|
||||
.command('test')
|
||||
@ -45,34 +46,58 @@ program
|
||||
'Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests'
|
||||
)
|
||||
.option('--debug', 'Print debugging info about your Jest config')
|
||||
.action(test);
|
||||
.action(async (options) => {
|
||||
const { test } = await import('./commands/jest.js');
|
||||
return test(options);
|
||||
});
|
||||
|
||||
program.command('clean').description('Clean all dist files').action(clean);
|
||||
program
|
||||
.command('clean')
|
||||
.description('Clean all dist files')
|
||||
.action(async () => {
|
||||
const { clean } = await import('./commands/clean.js');
|
||||
return clean();
|
||||
});
|
||||
|
||||
program
|
||||
.command('build')
|
||||
.description('Compile components in production mode')
|
||||
.action(build);
|
||||
.action(async () => {
|
||||
const { build } = await import('./commands/build.js');
|
||||
return build();
|
||||
});
|
||||
|
||||
program
|
||||
.command('release')
|
||||
.description('Compile components and release it')
|
||||
.option('--tag <tag>', 'Release tag')
|
||||
.action(release);
|
||||
.action(async (options) => {
|
||||
const { release } = await import('./commands/release.js');
|
||||
return release(options);
|
||||
});
|
||||
|
||||
program
|
||||
.command('build-site')
|
||||
.description('Compile site in production mode')
|
||||
.action(buildSite);
|
||||
.action(async () => {
|
||||
const { buildSite } = await import('./commands/build-site.js');
|
||||
return buildSite();
|
||||
});
|
||||
|
||||
program
|
||||
.command('changelog')
|
||||
.description('Generate changelog')
|
||||
.action(changelog);
|
||||
.action(async () => {
|
||||
const { changelog } = await import('./commands/changelog.js');
|
||||
return changelog();
|
||||
});
|
||||
|
||||
program
|
||||
.command('commit-lint <gitParams>')
|
||||
.description('Lint commit message')
|
||||
.action(commitLint);
|
||||
.action(async (gitParams) => {
|
||||
const { commitLint } = await import('./commands/commit-lint.js');
|
||||
return commitLint(gitParams);
|
||||
});
|
||||
|
||||
program.parse();
|
||||
|
@ -3,7 +3,7 @@ import execa from 'execa';
|
||||
import { join, relative } from 'path';
|
||||
import { clean } from './clean.js';
|
||||
import { CSS_LANG } from '../common/css.js';
|
||||
import { ora, consola } from '../common/logger.js';
|
||||
import { createSpinner, consola } from '../common/logger.js';
|
||||
import { installDependencies } from '../common/manager.js';
|
||||
import { compileSfc } from '../compiler/compile-sfc.js';
|
||||
import { compileStyle } from '../compiler/compile-style.js';
|
||||
@ -178,14 +178,14 @@ const tasks = [
|
||||
async function runBuildTasks() {
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const { task, text } = tasks[i];
|
||||
const spinner = ora(text).start();
|
||||
const spinner = createSpinner(text).start();
|
||||
|
||||
try {
|
||||
/* eslint-disable no-await-in-loop */
|
||||
await task();
|
||||
spinner.succeed(text);
|
||||
spinner.success({ text });
|
||||
} catch (err) {
|
||||
spinner.fail(text);
|
||||
spinner.error({ text });
|
||||
console.log(err);
|
||||
throw err;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { ROOT } from '../common/constant.js';
|
||||
import { ora, slimPath } from '../common/logger.js';
|
||||
import { createSpinner, slimPath } from '../common/logger.js';
|
||||
import { createWriteStream, readFileSync } from 'fs';
|
||||
import conventionalChangelog from 'conventional-changelog';
|
||||
|
||||
@ -48,7 +48,7 @@ function transform(item: any) {
|
||||
}
|
||||
|
||||
export async function changelog(): Promise<void> {
|
||||
const spinner = ora('Generating changelog...').start();
|
||||
const spinner = createSpinner('Generating changelog...').start();
|
||||
|
||||
return new Promise((resolve) => {
|
||||
conventionalChangelog(
|
||||
@ -68,7 +68,9 @@ export async function changelog(): Promise<void> {
|
||||
)
|
||||
.pipe(createWriteStream(DIST_FILE))
|
||||
.on('close', () => {
|
||||
spinner.succeed(`Changelog generated at ${slimPath(DIST_FILE)}`);
|
||||
spinner.success({
|
||||
text: `Changelog generated at ${slimPath(DIST_FILE)}`,
|
||||
});
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
import execa from 'execa';
|
||||
import { consola, ora } from '../common/logger.js';
|
||||
import { consola, createSpinner } from '../common/logger.js';
|
||||
import { SCRIPT_EXTS } from '../common/constant.js';
|
||||
|
||||
type RunCommandMessages = {
|
||||
@ -13,7 +13,7 @@ function runCommand(
|
||||
options: string[],
|
||||
messages: RunCommandMessages
|
||||
) {
|
||||
const spinner = ora(messages.start).start();
|
||||
const spinner = createSpinner(messages.start).start();
|
||||
|
||||
return new Promise((resolve) => {
|
||||
execa(cmd, options, {
|
||||
@ -21,11 +21,11 @@ function runCommand(
|
||||
env: { FORCE_COLOR: true },
|
||||
})
|
||||
.then(() => {
|
||||
spinner.succeed(messages.succeed);
|
||||
spinner.success({ text: messages.succeed });
|
||||
resolve(true);
|
||||
})
|
||||
.catch((err: any) => {
|
||||
spinner.fail(messages.failed);
|
||||
spinner.error({ text: messages.failed });
|
||||
consola.error(err.stderr || err.stdout);
|
||||
resolve(false);
|
||||
});
|
||||
|
@ -4,7 +4,7 @@ import { join, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const PLUGIN_PATH = join(__dirname, '../../cjs/vant-cli-release-plugin.cjs');
|
||||
const PLUGIN_PATH = join(__dirname, '../compiler/vant-cli-release-plugin.js');
|
||||
|
||||
export async function release(command: { tag?: string }) {
|
||||
await releaseIt({
|
||||
|
@ -1,10 +1,10 @@
|
||||
import ora from 'ora';
|
||||
import chalk from 'chalk';
|
||||
import { createSpinner } from 'nanospinner';
|
||||
import color from 'picocolors';
|
||||
import consola from 'consola';
|
||||
import { ROOT } from '../common/constant.js';
|
||||
|
||||
export function slimPath(path: string) {
|
||||
return chalk.yellow(path.replace(ROOT, ''));
|
||||
return color.yellow(path.replace(ROOT, ''));
|
||||
}
|
||||
|
||||
export { ora, consola };
|
||||
export { createSpinner, consola };
|
||||
|
@ -92,10 +92,13 @@ export async function compileSfc(filePath: string): Promise<any> {
|
||||
script += '// @ts-nocheck\n';
|
||||
}
|
||||
|
||||
let bindingMetadata;
|
||||
if (descriptor.scriptSetup) {
|
||||
script += compileScript(descriptor, {
|
||||
const { bindings, content } = compileScript(descriptor, {
|
||||
id: scopeId,
|
||||
}).content;
|
||||
});
|
||||
script += content;
|
||||
bindingMetadata = bindings;
|
||||
} else {
|
||||
script += descriptor.script!.content;
|
||||
}
|
||||
@ -108,6 +111,9 @@ export async function compileSfc(filePath: string): Promise<any> {
|
||||
id: scopeId,
|
||||
source: template.content,
|
||||
filename: filePath,
|
||||
compilerOptions: {
|
||||
bindingMetadata,
|
||||
},
|
||||
}).code;
|
||||
|
||||
script = injectRender(script, render);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import chalk from 'chalk';
|
||||
import color from 'picocolors';
|
||||
import { createRequire } from 'module';
|
||||
import { createServer, build } from 'vite';
|
||||
import {
|
||||
@ -38,8 +38,8 @@ export async function compileSite(production = false) {
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const { version } = require('vite/package.json');
|
||||
const viteInfo = chalk.cyan(`vite v${version}`);
|
||||
console.log(`\n ${viteInfo}` + chalk.green(` dev server running at:\n`));
|
||||
const viteInfo = color.cyan(`vite v${version}`);
|
||||
console.log(`\n ${viteInfo}` + color.green(` dev server running at:\n`));
|
||||
server.printUrls();
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
const releaseIt = require('release-it');
|
||||
const { execSync } = require('child_process');
|
||||
import { Plugin } from 'release-it';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
class VantCliReleasePlugin extends releaseIt.Plugin {
|
||||
class VantCliReleasePlugin extends Plugin {
|
||||
async beforeRelease() {
|
||||
// log an empty line
|
||||
console.log('');
|
||||
@ -11,4 +11,4 @@ class VantCliReleasePlugin extends releaseIt.Plugin {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = VantCliReleasePlugin;
|
||||
export default VantCliReleasePlugin;
|
@ -1,30 +1,9 @@
|
||||
// @ts-ignore
|
||||
import fs from 'fs';
|
||||
import { URL, fileURLToPath } from 'url';
|
||||
import { dev } from './commands/dev.js';
|
||||
import { lint } from './commands/lint.js';
|
||||
import { test } from './commands/jest.js';
|
||||
import { clean } from './commands/clean.js';
|
||||
import { build } from './commands/build.js';
|
||||
import { release } from './commands/release.js';
|
||||
import { changelog } from './commands/changelog.js';
|
||||
import { buildSite } from './commands/build-site.js';
|
||||
import { commitLint } from './commands/commit-lint.js';
|
||||
|
||||
const packagePath = fileURLToPath(new URL('../package.json', import.meta.url));
|
||||
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf-8'));
|
||||
export const cliVersion: string = packageJson.version;
|
||||
|
||||
process.env.VANT_CLI_VERSION = cliVersion;
|
||||
|
||||
export {
|
||||
dev,
|
||||
lint,
|
||||
test,
|
||||
clean,
|
||||
build,
|
||||
release,
|
||||
changelog,
|
||||
buildSite,
|
||||
commitLint,
|
||||
};
|
||||
|
10
packages/vant-eslint-config/LICENSE
Normal file
10
packages/vant-eslint-config/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/eslint-config",
|
||||
"version": "3.4.0",
|
||||
"version": "3.5.0",
|
||||
"description": "eslint config of vant",
|
||||
"main": "index.js",
|
||||
"publishConfig": {
|
||||
@ -20,17 +20,17 @@
|
||||
"author": "chenjiahan",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
||||
"@typescript-eslint/parser": "^5.10.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.3",
|
||||
"@typescript-eslint/parser": "^5.30.3",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-vue": "^8.4.0"
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-vue": "^9.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"enhanced-resolve": "^5.8.3",
|
||||
"eslint": "^8.7.0",
|
||||
"typescript": "~4.5.5"
|
||||
"enhanced-resolve": "^5.10.0",
|
||||
"eslint": "^8.19.0",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.32.0 || ^8.2.0"
|
||||
|
10
packages/vant-icons/LICENSE
Normal file
10
packages/vant-icons/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -23,7 +23,7 @@
|
||||
"author": "chenjiahan",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"release-it": "^14.11.6"
|
||||
"release-it": "^15.1.1"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
10
packages/vant-markdown-vetur/LICENSE
Normal file
10
packages/vant-markdown-vetur/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10
packages/vant-popperjs/LICENSE
Normal file
10
packages/vant-popperjs/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -41,8 +41,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.14.29",
|
||||
"release-it": "^14.2.2",
|
||||
"typescript": "~4.5.2"
|
||||
"release-it": "^15.1.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"release-it": {
|
||||
"git": {
|
||||
|
10
packages/vant-stylelint-config/LICENSE
Normal file
10
packages/vant-stylelint-config/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10
packages/vant-touch-emulator/LICENSE
Normal file
10
packages/vant-touch-emulator/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10
packages/vant-use/LICENSE
Normal file
10
packages/vant-use/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -38,8 +38,8 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.14.29",
|
||||
"release-it": "^14.0.2",
|
||||
"typescript": "~4.5.2",
|
||||
"release-it": "^15.1.1",
|
||||
"typescript": "^4.7.4",
|
||||
"vue": "^3.2.27"
|
||||
},
|
||||
"release-it": {
|
||||
|
10
packages/vant/LICENSE
Normal file
10
packages/vant/LICENSE
Normal file
@ -0,0 +1,10 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Youzan
|
||||
Copyright (c) Chen Jiahan and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -61,8 +61,8 @@
|
||||
"@vant/cli": "workspace:*",
|
||||
"@vant/eslint-config": "workspace:*",
|
||||
"@vue/runtime-core": "^3.2.27",
|
||||
"@vue/test-utils": "^2.0.0-rc.16",
|
||||
"typescript": "~4.5.2",
|
||||
"@vue/test-utils": "^2.0.1",
|
||||
"typescript": "^4.7.4",
|
||||
"vue": "^3.2.27",
|
||||
"vue-router": "^4.0.12"
|
||||
},
|
||||
|
@ -5,6 +5,6 @@ import { extend } from '../utils';
|
||||
export function useExpose<T = Record<string, any>>(apis: T) {
|
||||
const instance = getCurrentInstance();
|
||||
if (instance) {
|
||||
extend(instance.proxy, apis);
|
||||
extend(instance.proxy as object, apis);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
import Lazy from './lazy';
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
import { h } from 'vue';
|
||||
import { inBrowser, useRect } from '@vant/use';
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
/* eslint-disable max-classes-per-file */
|
||||
/* eslint-disable prefer-object-spread */
|
||||
import { remove } from './util';
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
import { useRect } from '@vant/use';
|
||||
import { loadImageAsync } from './util';
|
||||
import { noop } from '../../utils';
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
import { nextTick } from 'vue';
|
||||
import { inBrowser, getScrollParent } from '@vant/use';
|
||||
import {
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
import { useRect } from '@vant/use';
|
||||
import { loadImageAsync } from './util';
|
||||
import { noop } from '../../utils';
|
||||
|
@ -1,3 +1,8 @@
|
||||
/**
|
||||
* This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
* license at https://github.com/hilongjw/vue-lazyload/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
import { inBrowser } from '@vant/use';
|
||||
|
||||
export const hasIntersectionObserver =
|
||||
|
2368
pnpm-lock.yaml
generated
2368
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user