Sawala is open source, so every feature in Sawala is developed by your help. You too can help contribute to this project! This page describes how to setup the project on your computer for local development.
This project is bound by a Code of Conduct.
The simple steps of contributing to any GitHub project are as follows:
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push -u origin my-new-feature
- Create a Pull Request!
To keep your fork of in sync with this repository, follow this guide.
For members of the Kata.ai organization, or if you have push access to this repository, just clone directly from the repo and push your branches here. It's fine.
- Git
- Node.js (8.0.0+)
- NPM
- Yarn
- Text Editor with EditorConfig & Prettier support. (We recommend Visual Studio Code)
Run these commands inside the Terminal (PowerShell/Command Prompt for Windows).
Git: You should see the version number:
$ git version
git version 2.18.0
Node.js: You should see the version number:
$ node -v
v10.16.3
NPM: You should see the version number:
$ npm -v
6.9.0
First, you should clone the repository.
$ git clone https://github.com/kata-ai/sawala.git
After these repository has been cloned, cd
into the repository:
$ cd sawala
Install the project's dependencies. Note that you can use NPM, or YARN:
$ npm
To start developing features, you have to run the Sawala in your another directory project.
$ npm i -D sawala-test@file:../sawala
import * as React from 'react';
import { SawalaChat } from 'sawala-test';
import { EmptyMessage } from '@kata-kit/common';
export default class Chat extends React.Component<Props> {
renderEmptyRoom = () => {
return (
<EmptyMessage
image={require('assets/images/no-page.svg')}
title={'No chat selected'}
>
Please select chat first.
</EmptyMessage>
);
};
render() {
return (
<SawalaChat
config={{
autoConnect: true,
appId: 'sdksample',
user: {
id: 'rohmad@kata.ai',
password: 'q1w2e3r4',
displayName: 'Rohmad from Kata.ai',
avatar:
'https://res.cloudinary.com/kata-ai/image/upload/v1572663263/sawala/kata_favicon-02_zzldhx.png'
}
}}
onRendered={this.handleRendered}
noSelectedComponent={this.renderEmptyRoom()}
onClickDetailComment={this.handleClickDetailComment}
loginSuccessCallback={this.handleloginSuccessCallback}
newMessagesCallback={this.handlenewMessagesCallback}
/>
);
}
}
Then, you should open your directory project with your domain app.
Example: http://localhost:3000