Skip to content
Chia-Lung Chen edited this page Apr 19, 2019 · 10 revisions

Kaku Icon

Welcome to the Kaku wiki ! Please check right sidebar for any information that you want to know !

Table of contents

Setup environment

Because we use npm to maintain our third party libraries, you have to make sure before doing anything, these needed stuffs are all installed already.

  1. Use node 6.10.3 (npm 5.0.4)
  2. npm i

Prerequisites before compiling

!!!!!!THIS IS IMPORTANT, PLEASE READ THIS!!!!!!

Please take a look at config/, you will notice there are some files named like api_config.*.json, remember to update them with correct config and rename them to api_config.production.json, then everything should work as perfect !

In order to make sure others can join the development without worrying too much about this config, I just added api_config.development.json for you guys ! If you don't want to register these services by yourself and want to jump to develop directly, please just copy the file and rename to api_config.production.json then you are done !

Compile

Compile everything

npm run compile # for development

or for production

NODE_ENV=production npm run compile # for production

Compile less

npm run compile:less

Compile js

npm run compile:js

Compile env

npm run compile:env

Develop

For one-time tester

npm run compile && ./node_modules/.bin/electron .

For someone who wants to contribute and write features

A) Prepare assets first

npm run compile

B) Use one terminal to watch js change

./node_modules/.bin/webpack --watch

C) Use another terminal to run electron

./node_modules/.bin/electron .

Test

Unit test

npm test

Linter

... to be continued

Build

Build 3 platforms at one time

npm run build # production build

or

npm run build:development # development build

Build Mac

npm run build:mac

Build GNU/Linux

npm run build:linux

Build Windows

npm run build:windows

Translation

Because we use Transifex to provide a cleaner and easy to use interface for translators, you need to install the command tool called tx to update translations.

After installing, you don't need to setup anything else because they are all set up already under .tx/config ! You just need to use the command below to update translations !

tx pull -a --minimum-perc=90 # we only need any translation which has been translated > 90%