ブランチ
ブランチ ↗は、シンプルな宣言的設定とシームレスなインクリメンタルコンパイルを備えた、迅速なフロントエンドWebアプリケーションビルドツールです。
まず、ブランチをインストールします:
npm install -g brunchブランチは、プロジェクトのボイラープレートを提供するために、コミュニティ提供のスケルトン ↗のライブラリを維持しています。ブランチの推奨するes6スケルトンをbrunch newコマンドで実行します:
brunch new proj -s es6All of the framework guides assume you already have a fundamental understanding of Git ↗. If you are new to Git, refer to this summarized Git handbook ↗ on how to set up Git on your local machine.
If you clone with SSH, you must generate SSH keys ↗ on each computer you use to push or pull from GitHub.
Refer to the GitHub documentation ↗ and Git documentation ↗ for more information.
Create a new GitHub repository by visiting repo.new ↗. After creating a new repository, go to your newly created project directory to prepare and push your local application to GitHub by running the following commands in your terminal:
git initgit remote add origin https://github.com/<your-gh-username>/<repository-name>git add .git commit -m "Initial commit"git branch -M maingit push -u origin mainサイトをPagesにデプロイするには:
- Cloudflareダッシュボード ↗にログインし、アカウントを選択します。
- アカウントホームで、Workers & Pages > アプリケーションの作成 > Pages > Gitに接続を選択します。
- 作成した新しいGitHubリポジトリを選択し、ビルドとデプロイの設定セクションで、_Brunch_をフレームワークプリセットとして選択します。選択により、以下の情報が提供されます。
| Configuration option | Value |
|---|---|
| Production branch | main |
| Build command | npx brunch build --production |
| Build directory | public |
Cloudflare Pagesに最初のサイトをデプロイするための完全なガイドについては、はじめにガイドを参照してください。
サイトをデプロイした後、*.pages.devのプロジェクト用のユニークなサブドメインが提供されます。
ブランチサイトに新しいコードをコミットするたびに、Cloudflare Pagesは自動的にプロジェクトを再ビルドしてデプロイします。また、新しいプルリクエストでプレビューのデプロイにアクセスでき、変更が本番環境にデプロイされる前にサイトにどのように表示されるかをプレビューできます。
By completing this guide, you have successfully deployed your Brunch site to Cloudflare Pages. To get started with other frameworks, refer to the list of Framework guides.