]> git.ipfire.org Git - thirdparty/vuejs/create-vue.git/commitdiff
fix: revert to the `serve` script name for previewing
authorHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 26 Jul 2021 11:28:45 +0000 (19:28 +0800)
committerHaoqun Jiang <haoqunjiang@gmail.com>
Mon, 26 Jul 2021 11:28:45 +0000 (19:28 +0800)
1. it's the default in vite templates, users might be used to it already
2. `preview` starts with a `pre` string, making npm failing to recognize
and auto-run the `prepreview` script before it

template/config/base/package.json
template/config/cypress/package.json

index ede5f0154fa7bd0e4434802a1324e2e4ef8abe40..525ad87b7c0f6d54a63ba692f423ae2f70538881 100644 (file)
@@ -2,8 +2,8 @@
   "scripts": {
     "dev": "vite",
     "build": "vite build",
-    "prepreview": "vite build",
-    "preview": "vite preview --port 5050"
+    "preserve": "vite build",
+    "serve": "vite preview --port 5050"
   },
   "dependencies": {
     "vue": "^3.1.5"
index 9edbc2734b7658098660fe3c83c56fd5d899134d..5a697e57842373ee9a8b2cde47d26410b64fe3d2 100644 (file)
@@ -2,8 +2,8 @@
   "scripts": {
     "test:unit": "cypress open-ct",
     "test:unit:ci": "cypress run-ct --quiet --reporter spec",
-    "test:e2e": "start-server-and-test preview 5050 'cypress open'",
-    "test:e2e:ci": "start-server-and-test preview 5050 'cypress run'"
+    "test:e2e": "start-server-and-test serve 5050 'cypress open'",
+    "test:e2e:ci": "start-server-and-test serve 5050 'cypress run'"
   },
   "devDependencies": {
     "@cypress/vite-dev-server": "^2.0.2",