LoginSignup
1
0

More than 1 year has passed since last update.

npmでプロジェクトを作成する

Last updated at Posted at 2023-01-20

nvmでNode.jsをインストールし、
その後npmでVue.jsプロジェクトを作成した。

手順

新しいプロジェクトの作成

latestだけでもOK、コマンド実行後にプロジェクト名、使用するテンプレート、言語を選択する。
viteはビルドツール。

npm init vite@latest [プロジェクト名] -- --template vue					

作成したプロジェクトフォルダへ移動

今回はfirst-vue-appという名前のプロジェクトを作成したので、そこに移動する。

cd first-vue-app

Vue.jsを動作させるためのパッケージをインストール

npm install	

自動的に色々と作成してくれる。

開発サーバを起動

npm run dev													

サーバを起動するとポートが出るので、ブラウザでアクセスすれば初期画面が表示される。

➜  Local:   http://localhost:5173/

サーバを止めたい時はctrl + cで止めることができる。

関連記事

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0