Skip to content

Commit

Permalink
[update]distフォルダがなかったら作成されるように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
920oj committed Jan 9, 2021
1 parent 9381ac7 commit 8bed343
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func main() {
fmt.Fprintln(os.Stderr, err)
}

// ./dist フォルダが無ければ作成
if _, err := os.Stat("./dist"); os.IsNotExist(err) {
os.Mkdir("./dist", 0777)
}

// ファイル書き込み
err = writeBytes("./dist/index.html", buff.Bytes())
if err != nil {
Expand Down

0 comments on commit 8bed343

Please sign in to comment.