feat(create-vant-cli-app): update to cli v4

This commit is contained in:
chenjiahan 2022-02-07 15:22:43 +08:00
parent 71eb44b42e
commit 8700b86e67
3 changed files with 12 additions and 11 deletions

View File

@ -1,3 +0,0 @@
module.exports = {
presets: ['@vant/cli/preset'],
};

View File

@ -3,20 +3,23 @@
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "lib/<%= name %>.js", "main": "lib/<%= name %>.js",
"module": "es/index.js",
"style": "lib/index.css", "style": "lib/index.css",
"typings": "lib/index.d.ts",
"files": [ "files": [
"lib", "lib",
"es" "es"
], ],
"scripts": { "scripts": {
"dev": "vant-cli dev", "dev": "vant-cli dev",
"test": "vant-cli test",
"lint": "vant-cli lint", "lint": "vant-cli lint",
"test": "vant-cli test",
"build": "vant-cli build", "build": "vant-cli build",
"prepare": "husky install", "build:site": "vant-cli build-site",
"release": "vant-cli release", "release": "vant-cli release --tag next",
"test:coverage": "open test/coverage/index.html", "release:site": "pnpm build:site && gh-pages -d site-dist",
"build-site": "vant-cli build-site && gh-pages -d site-dist" "test:watch": "vant-cli test --watch",
"test:coverage": "open test/coverage/index.html"
}, },
"author": "", "author": "",
"license": "MIT", "license": "MIT",
@ -30,8 +33,9 @@
"vue": "^3.0.0" "vue": "^3.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vant/cli": "^3.9.0", "@vant/cli": "^4.0.0",
"vue": "^3.0.0" "vue": "^3.0.0",
"sass": "^1.49.7"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View File

@ -1,4 +1,4 @@
module.exports = { export default {
name: '<%= name %>', name: '<%= name %>',
build: { build: {
css: { css: {