/dipact

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Deploy

dipact

About

A work-in-progress web client for diplicity.

The latest version is deployed at https://dipact.appspot.com.

Develop

Community

We discuss the development via mail at diplicity-dev and via chat at the #development channel on our Discord server

Style guide

This is evolving, and not fully followed, but some guidelines:

  • Use Pretty to format the code. I use vim-prettier which changes some settings, I think. Let's discuss how to solve that if someone wants to use Pretty with different settings - I'm totally open to changing this.
  • Use CamelCase (or camelCase), not snake_case. I know JavaScript often uses snake_case, but it seems React uses CamelCase, so let's go with that.
  • Use inline styles for small local changes, if possible. Save global CSS for themes or global changes.

Technology

It uses React and Material-UI to render pages. It also uses Babel to precompile all .js files. This means that all .js files are written in Babel, not plain JavaScript.

It also means that all .js files are transpiled from Babel to plain JavaScript. This happens via github.com/zond/dipact/fs. When running locally, this happens on the fly and causes page renders to be relatively slow, but the deploy script pregenerates a new http.FileSystem using github.com/shurcooL/vfsgen and github.com/jvatic/goja-babel to make production serving fast.

Running locally

  1. Install Go.
  2. Install Google Cloud SDK.
  3. Run dev_appserver.py app.yaml.
  4. Go to http://localhost:8080/.

Deploying

The deploy script causes the latest version to be pushed to https://dipact.appspot.com/ on each new push.

Pushing branches with sensible names to https://github.com/zond/dipact causes them to be pushed to https://[branch-name]-dot-dipact.appspot.com/ on each new push.