1 Create a Repository from github
Step1: Go to github to create a repository
Step 2: Select a folder to store on the computer
You can choose any folder. I recommend that you leave it in D
Step3: Open the gitbash and empty clone project you just created on github
First, if you don’t have gitbash, you can go here to download https://git-scm.com/downloads
câu lệnh : git clone + pase
The basic command commands of git
2 Create a project with vue cli
- The package name of the old vue-cli is
vue-cli
and the current name is@vue/cli
- If your device has installed vue-cli (1.x or 2.x) package installed globally you need to uninstall before
npm uninstall vue-cli -g or yarn global remove vue-cli.
- The Vue CLI requires you to use Node.js version 8.9 or above 8.11.0
- step 1: run the command to create a new package, you can turn on the TERMINAL of VS code to run if you use VScode like yourself
1 2 3 4 | npm install -g @vue/cli or yarn global add @vue/cli |
If successful you will receive a Success notice. You already have vue binary access in the command line, you can check the version with the vue --version
command
- step2: create a new project After the global installation is complete you can use * .vue to run. But our purpose is a complete CLi structure so we will use the
vue create vue-cli-version1
command to initialize a vue-cli-version1 project
After you run the command – you will see an option
If you continue to press the Enter key – the system will automatically install the defaults for you babel and eslint . If you choose Manually select features
you will have a number of options to configure your project.
These things we will talk about in the next section we choose default and press enter to create a new project. After successful creation you will also receive a success message. Congratulations, you have successfully created a project using vuecli. You can also use vue create --help
to see some optional commands
- step 3: run the project
1 2 3 4 | npm run serve hoặc yarn serve |
To run your newly created project