Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Latest commit

 

History

History
72 lines (50 loc) · 2.08 KB

workflow.md

File metadata and controls

72 lines (50 loc) · 2.08 KB

English / 日本語

Workflow

All modules for both build system and frontend development are managed by npm.
If you cloned an existing project from Git repository, run npm install before starting development.

1. Start development server

First, start localhost server for your development.

$ npm start

This command does following tasks:

  • Start Browsersync server and open http://localhost:3000 on your web browser.
  • Validate and compile source code when you save a file.
  • Refresh browser automatically when you update the page.

Your can see the compiler/server/linter log on your terminal. If you want to quit this process, press Cntl + C.

2. Develop web application

Develop your web application by editing files in "app" directory.

Tips:

3. Build project

When you finish editing app, you should build your project before git-commit.

$ npm run build

This command does:

  • Test your source code at first.
  • Compile/optimize files and output artifacts into "dist" directory.

Note: Usage of directories

  • "app" - Files for development. This directory contains source code and original assets.
  • "dist" - Files for production. This directory is not tracked in the Git main branch. Do not edit files directly.

4. Preview built contents

Check the built contents. Start localhost server using "dist" directory.

$ npm run serve:dist

Looks good? If so, create a git-commit and push it to remote repository.

5. Deploy built files

Upload built files to deployment branch.

$ npm run deploy

By default, built files will be pushed to "gh-pages" branch of your remote repository.
See Create deployment branch for more details.