[Vuejs]-How to scaffold a vue project in an existing repo?

1👍

In your root folder, type

  • vue create .

  • select Y for "Generate project in current directory"

Follow the rest of the setup and you’re cool.

0👍

Super simple steps to have a basic Vue app workflow:

  • (npm install --global @vue/cli to install the CLI if not already done)
  • vue create my-tasty-project, choose a default Vue preset
  • cd my-tasty-project
  • go to repo.new to create a new Github repo, set the name to my-tasty-project, click on Create repository
  • copy the 3 commands given at or push an existing repository from the command line into your terminal
  • (go to your Github Desktop app and click on Add an Existing Repository from your Hard Drive... (or Add Existing Repository... if you have something already opened up), select the freshly created my-tasty-project directory and Add Repository to have the whole Git flow into your GUI
  • code .

I recommend the following setup:

  • npm init vue my-cool-project (using Vue3, because we’re soon in June 2022 and because it’s the default recommendation)
  • cd my-cool-project
  • ni (then choose yarn)
  • git init && gaa && gcmsg "init" (create a new git repo + add all the files + create a new commit with the message init, thanks to ohmyzsh)
  • hub create (cool CLI tool to make some quick and simple operations on Github from the CLI, will push the local git repo remotely and link the original remote URL for you, the official Github CLI could also be used)
  • code . (may need an extra config to work on MacOS)

That way, you have your repo linked to the project and you’re ready to code with some nice gcmsg + ggpush combo. Of course, some ntl could be nice too, to ship apps quickly to Netlify.

Leave a comment