LoginSignup
3
0

Vue.jsを書くための準備をまとめる

Posted at

1. Vue CLIの導入

Vue CLIを入れてない場合は以下でインストール

npm install -g @vue/cli

2. Vue.jsプロジェクトを作成

任意のプロジェクトを作成します。
※「my-project」は任意の名前です。

vue create my-project

3. Vue.jsプロジェクトを起動

プロジェクトに移動

cd my-project

プロジェクトを起動

npm run serve

おまけ: BootStrapを使えるようにする

Bootstrapをインストール

// yarn
yarn add bootstrap-vue

// npm
npm install bootstrap-vue

次にsrc/main.jsに下記の記述を追加します。

import Vue from 'vue'
import App from './App.vue'
+ import 'bootstrap/dist/css/bootstrap.css'          // 追加
+ import 'bootstrap-vue/dist/bootstrap-vue.css' // 追加
Vue.config.productionTip = false
3
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
3
0