Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 13774a1

Browse files
committed
Add Typescript scaffold.
- Add dependencies - Add tsconfig that extends recommended config - Add eslint config - Update .gitignore to ignore js files in ts-dir - Add README - Add jest config for testing
1 parent a417b0a commit 13774a1

7 files changed

+6150
-2
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
node_modules/
2+
.idea/*
13
.env
2-
node_modules
3-
*.tsbuildinfo
4+
node-ts/src/**/*.js
5+
node-ts/src/**/*.js.map
6+
*.tsbuildinfo

node-ts/.eslintrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"plugins": [
4+
"@typescript-eslint"
5+
],
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/eslint-recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
]
11+
}

node-ts/README.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
# Iskaribot.node
3+
4+
Message-relaying bot for cross-posting messages between platforms.
5+
6+
7+
## Run Locally
8+
9+
Clone the project
10+
11+
```bash
12+
git clone https://github.com/evry-ace/iskaribot.git
13+
```
14+
15+
Go to the project directory
16+
17+
```bash
18+
cd iskaribot/node
19+
```
20+
21+
Install dependencies
22+
23+
```bash
24+
npm install
25+
```
26+
27+
Build the program
28+
29+
```bash
30+
npm run build
31+
```
32+
33+
Start the server
34+
35+
```bash
36+
npm run start
37+
```
38+
39+
40+
## Environment Variables
41+
42+
To run this project, you will need to add the following environment variables to your .env file
43+
44+
`API_KEY`
45+
46+
`ANOTHER_API_KEY`
47+

node-ts/jest.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
// eslint-disable-next-line no-undef
3+
module.exports = {
4+
preset: 'ts-jest',
5+
testEnvironment: 'node',
6+
};

0 commit comments

Comments
 (0)