Comment démarrer un projet avec vuejs : 1. Installez node.js ; 2. Installez "@vue/cli" ; 3. Utilisez la commande "vue create project name" pour créer un projet ; entrez dans le répertoire du projet vue ; 5. Exécutez la commande "npm run serve" pour démarrer le projet.
![Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/article/000/000/024/6141a98e3b6b4773.jpg)
L'environnement d'exploitation de ce tutoriel : système Windows 7, vue version 2.9.6, ordinateur DELL G3.
Prérequis : Installer node.js
Démarrer le projet vue
- Si vous souhaitez démarrer le projet vue, il y a deux manières, la première est d'utiliser @vue/cli, la seconde est d'utiliser webpack pour repartir de zéro Construisez un projet Vue ; si vous êtes novice, il est recommandé d'utiliser l'outil @vue/cli encapsule le chargeur et le plugin de webnpack, ce qui vous permet de démarrer rapidement le projet vue ; en utilisant @vue/cli ci-dessous
- Entrez sur le site officiel https://cli.vuejs.org/zh/
- Installez @vue/cli
npm install -g @vue/cli
npm install -g @vue/cli
- 查看@vue/cli版本号
vue --version
-
vue create hello-world
创建一个项目
![163169274481219Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/824/945/580/163169274481219Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
选择手工选择
![163169275873689Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/146/910/956/163169275873689Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
选择babel,css pre-processors,linter,unit testing,选择后按回车
![163169276436910Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/613/360/721/163169276436910Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169277022182Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/968/451/958/163169277022182Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169277587913Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/587/852/569/163169277587913Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169278049428Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/694/585/570/163169278049428Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169278581393Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/864/961/392/163169278581393Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169281539682Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/797/645/481/163169281539682Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
安装成功后
![163169282271832Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/781/517/761/163169282271832Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
cd hello-world $ npm run serve
View le numéro de version @vue/cli vue --version
vue create hello-world
Créer un projet![163169282724035Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/276/119/320/163169282724035Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169274481219Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php%20.cn/upload/image/824/945/%20580/163169274481219Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
- Choisissez la sélection manuelle
![163169275873689Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https%20://img.php.cn/upload/%20image/146/910/956/163169275873689Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
![163169284078483Comment démarrer un projet dans le développement vuejs 1Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/519/176/713/163169284078483Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
Sélectionnez Babel, pré-processeurs CSS, linter , tests unitaires, sélectionnez et appuyez sur Entrée
![163169277022182Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/968/451/958/163169277022182Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
🎜🎜
![163169277587913Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/587/852/569/163169277587913Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
🎜🎜
![163169278049428Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://img.php.cn/upload/image/694/585/570/163169278049428Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
🎜🎜
![163169278581393Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https:/%20/img.php.cn/upload/image/864/961/392/163169278581393Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
🎜🎜🎜🎜Après une installation réussie🎜 🎜
![163169282271832Comment démarrer un projet dans le développement vuejs Comment démarrer un projet dans le développement vuejs](https://%20img.php.cn/upload/image/781/517/761/163169282271832Comment%20d%C3%A9marrer%20un%20projet%20dans%20le%20d%C3%A9veloppement%20vuejs)
🎜🎜🎜cd hello-world $ npm run serve Entrez cette commande 🎜🎜🎜🎜🎜🎜🎜 pour ouvrir http://localhost:8080/ La page suivante apparaîtra, indiquant que le projet a été créé et démarré avec succès🎜 🎜🎜🎜🎜🎜Recommandations associées : "🎜Tutoriel vue.js🎜" 🎜
Ce qui précède est le contenu détaillé de. pour plus d'informations, suivez d'autres articles connexes sur le site Web de PHP en chinois!
Déclaration:Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn