m_shige1979のときどきITブログ

プログラムの勉強をしながら学習したことや経験したことをぼそぼそと書いていきます

Github(変なおっさんの顔でるので気をつけてね)

https://github.com/mshige1979

Vueのインストール

Vue

jp.vuejs.org

お試し

インストール

% yarn global add @vue/cl
% vue -V
@vue/cli 4.5.15
%

プロジェクト作成

vue create .

※カレントディレクトリ直下に作成する ※Manualで色々設定してみた(v2)

ディレクトリ構成

% tree -L 3 -I node_modules
.
├── README.md
├── babel.config.js
├── package.json
├── public
│   ├── favicon.ico
│   └── index.html
├── src
│   ├── App.vue
│   ├── assets
│   │   └── logo.png
│   ├── components
│   │   └── HelloWorld.vue
│   ├── main.ts
│   ├── router
│   │   └── index.ts
│   ├── shims-vue.d.ts
│   ├── store
│   │   └── index.ts
│   └── views
│       ├── About.vue
│       └── Home.vue
├── tests
│   └── unit
│       └── example.spec.ts
├── tsconfig.json
└── yarn.lock

vue.config.js

module.exports = {
  devServer: {
    port: 5000,
    disableHostCheck: true,
  },
};

起動

yarn serve

※初回は多分ビルドが走る
f:id:m_shige1979:20211104193216p:plain