Vamos aprender a preparar nosso ambiente de desenvolvimento Vue com Vue CLI 3.

ATENÇÃO: Se você já tem uma versão anterior instalada, é necessário que desinstale.

O nome do pacote foi alterado de vue-clipara @vue/cli.Se você tiver o vue-clipacote anterior (1.x ou 2.x) instalado globalmente, será necessário desinstalá-lo primeiro com npm uninstall vue-cli -gou yarn global remove vue-cli.

Requisito de versão do Node

O Vue CLI requer o Node.js versão 8.9 ou superior (8.11.0+ recomendado). Você pode gerenciar várias versões do Nó na mesma máquina com nvm ou nvm-windows .

Para instalar o novo pacote, use um desses comandos:

npm install -g @vue/cli

Após a instalação, você terá acesso ao vuebinário na sua linha de comando. Você pode verificar se está instalado corretamente, simplesmente executando vue, o que deve apresentar uma mensagem de ajuda listando todos os comandos disponíveis.

Criando um projeto Vue

Para criar um novo projeto, execute:

vue create hello-world

ATENÇÃO: Se você estiver no Windows usando o Git Bash com o minTTY, os prompts interativos não funcionarão. Você deve iniciar o comando como winpty vue.cmd create hello-world.

Você será solicitado a escolher uma predefinição. Você pode escolher a predefinição padrão que vem com uma configuração básica do Babel + ESLint ou selecionar “Selecionar recursos manualmente” para selecionar os recursos necessários.

A configuração padrão é ótima para prototipar rapidamente um novo projeto, enquanto a configuração manual fornece mais opções que provavelmente são necessárias para mais projetos orientados à produção.

Usando GUI

Você também pode criar e gerenciar projetos usando uma interface gráfica com o vue uicomando:

vue ui

O comando acima abrirá uma janela do navegador com uma GUI que o guiará pelo processo de criação do projeto.


Samuelson
Samuelson

Apenas um desenvolvedor que resolveu compartilhar o que aprendeu, procuro passar a realidade do desenvolvimento de software com exemplos práticos e sem enrolação. Trabalho com desenvolvimento de SREP (Sistemas de Registo Eletrônico de Ponto) e integração de leitores biométricos de acordo com os padrões da portaria 373/2011.

    20 replies to "Primeiros passos com Vue CLI 3"

    • Genuinely no matter if someone doesn’t know afterward its up
      to other people that they will help, so here it occurs.

    • gamefly free trial

      Do you mind if I quote a couple of your articles as long as I provide
      credit and sources back to your blog? My blog is in the very same niche as yours and my
      visitors would certainly benefit from some of the information you provide here.
      Please let me know if this okay with you. Many thanks!

    • Hello, I believe your site could possibly be having internet browser compatibility issues.
      When I take a look at your blog in Safari, it looks fine however, if opening
      in I.E., it has some overlapping issues. I merely wanted to give you a quick heads up!
      Besides that, wonderful blog!

    • gamefly free trial

      I was suggested this web site by my cousin. I am no longer certain whether
      this publish is written through him as no one else recognise such particular approximately my trouble.
      You are wonderful! Thank you!

    • gamefly free trial

      Just wish to say your article is as surprising.
      The clearness to your post is just excellent and that
      i can think you are an expert in this subject.
      Fine along with your permission allow me to grasp your feed to keep updated with impending
      post. Thank you 1,000,000 and please continue the gratifying work.

    • gamefly free trial

      Why viewers still use to read news papers when in this technological globe everything is presented on net?

    • gamefly free trial

      We’re a group of volunteers and starting a new scheme in our community.
      Your site provided us with valuable information to work on. You’ve done a formidable job and our entire community will be
      thankful to you.

    • Lesjouh

      Cheap Pharmacy cialis generic Urivoid Baclofene Batel

    • gamefly free trial

      Aw, this was an incredibly nice post. Finding the time and actual effort to make a very
      good article… but what can I say… I hesitate a lot and never manage to get anything done.

    • gamefly free trial

      For hottest news you have to visit internet and on internet I found this web site as a most excellent
      website for hottest updates.

    • gamefly free trial

      Hi, I desire to subscribe for this blog to obtain hottest updates, therefore where can i do it please assist.

    • gamefly free trial

      What’s up to every body, it’s my first pay a visit of this web site; this weblog
      consists of remarkable and truly excellent information in favor of readers.

    • gamefly free trial

      I like the helpful information you provide in your articles.
      I will bookmark your weblog and check again here frequently.
      I am quite certain I will learn a lot of new stuff right
      here! Best of luck for the next!

    • observation game ps4

      Wow, that’s what I was exploring for, what a information!
      existing here at this webpage, thanks admin of this web page.

    • Hello my friend! I want to say that this article is
      amazing, nice written and come with approximately all important infos.
      I’d like to see extra posts like this .

    • That is a good tip particularly to those new to the blogosphere.
      Short but very accurate info… Thank you for sharing this one.
      A must read article!

    • quest bars cheap

      Ridiculous story there. What occurred after?
      Good luck!

    • quest bars cheap

      An outstanding share! I have just forwarded this onto a coworker who was conducting a
      little research on this. And he actually bought me dinner
      due to the fact that I stumbled upon it for him…
      lol. So let me reword this…. Thank YOU for the meal!!
      But yeah, thanks for spending some time to talk
      about this matter here on your web page.

    • quest bars

      Hey there I am so grateful I found your webpage, I really
      found you by error, while I was searching on Google for something else, Anyways I am here now and
      would just like to say many thanks for a marvelous post and a all round entertaining blog (I also love the theme/design), I don’t have time to browse it all at the moment but I have saved it
      and also added in your RSS feeds, so when I have time I will be back to read a great deal
      more, Please do keep up the fantastic work.

    • http://tinyurl.com

      Hello there, You’ve done a fantastic job. I’ll definitely digg it and personally suggest to
      my friends. I’m confident they’ll be benefited from this site.

Leave a Reply

Your email address will not be published.