forked from kol/BlogMatch
從yarn改回npm,並將前端部署用的檔案從git分離
Laravel預設仍是使用npm,若不使用npm的情況下,會造成在跑 `yarn run dev` 的時候,中間有環節會呼叫npm時會出錯。 另外在使用 `npm run dev` 時發現會覆蓋掉有被git算上的前端部屬用的檔案,故修改.gitignore將這些檔案脫離。
This commit is contained in:
parent
62ce1f2068
commit
67969b005f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
|
/public/js
|
||||||
|
/public/css
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/vendor
|
/vendor
|
||||||
/.idea
|
/.idea
|
||||||
|
10479
public/css/app.css
vendored
10479
public/css/app.css
vendored
File diff suppressed because it is too large
Load Diff
47404
public/js/app.js
vendored
47404
public/js/app.js
vendored
File diff suppressed because it is too large
Load Diff
10
readme.md
10
readme.md
@ -5,9 +5,7 @@
|
|||||||
sudo apt install php mysql-server phpmyadmin php-mbstring php-xml php-zip curl wget libpng-dev
|
sudo apt install php mysql-server phpmyadmin php-mbstring php-xml php-zip curl wget libpng-dev
|
||||||
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
|
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
sudo cat /etc/mysql/debian.cnf #查詢系統內定的MySQL預設帳號密碼
|
sudo cat /etc/mysql/debian.cnf #查詢系統內定的MySQL預設帳號密碼
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
|
sudo apt update && apt install nodejs npm
|
||||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
|
|
||||||
sudo apt update && apt install nodejs yarn
|
|
||||||
|
|
||||||
## 專案參數與環境重建
|
## 專案參數與環境重建
|
||||||
當你Clone下來的專案,因為有git採用了 `.gitignore` 機制,比較敏感的參數(像是APP_KEY、資料庫帳密等)與共用的函式庫檔案不會包含進來,必須在自己這邊重建。
|
當你Clone下來的專案,因為有git採用了 `.gitignore` 機制,比較敏感的參數(像是APP_KEY、資料庫帳密等)與共用的函式庫檔案不會包含進來,必須在自己這邊重建。
|
||||||
@ -22,7 +20,7 @@
|
|||||||
$ composer install
|
$ composer install
|
||||||
|
|
||||||
### 3. 安裝前端相關函式庫
|
### 3. 安裝前端相關函式庫
|
||||||
$ yarn install
|
$ npm install
|
||||||
|
|
||||||
### 4. 設定 .env 檔
|
### 4. 設定 .env 檔
|
||||||
將 `.env.example` 複製成 `.env`。
|
將 `.env.example` 複製成 `.env`。
|
||||||
@ -38,6 +36,10 @@
|
|||||||
|
|
||||||
就可以了,資料表都會自動產生
|
就可以了,資料表都會自動產生
|
||||||
|
|
||||||
|
### 7. 重建前端部屬用檔案
|
||||||
|
|
||||||
|
$ npm run dev
|
||||||
|
|
||||||
## 執行此專案
|
## 執行此專案
|
||||||
### 快速啟動
|
### 快速啟動
|
||||||
$ php artisan serve
|
$ php artisan serve
|
||||||
|
Loading…
x
Reference in New Issue
Block a user