Skip to content

Commit

Permalink
Feature/example structure (#15)
Browse files Browse the repository at this point in the history
* moving src/example out and add contribution guide

* adding tsconfig for example folder, and makeing some changes to root package.json and example's package.json
  • Loading branch information
jxx016 authored Feb 5, 2025
1 parent d24c7f4 commit 9b4d5b5
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 3 deletions.
26 changes: 26 additions & 0 deletions CONTRIBUTION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing to GAME SDK

There are various ways you can contribute to the GAME SDK, whether it's fixing bugs, adding new plugins, or improving the documentation.

### Submitting Code (e.g. plugins)
1. **Fork** the repository and clone it to your local machine.
2. **Create a Branch** for your changes.
3. **Make Changes** to address the issue or add the feature.
4. **Commit** with a message that clearly explains your change.
5. **Push** the branch to your fork and submit a pull request.
6. **Label** the pull request appropriately based on the [label definitions](#label-definitions)

### Reporting Bugs
- Open an issue in the [Issues](https://github.com/game-by-virtuals/game-python/issues) tab and tag it as a `bug`.

### Suggesting Enhancements
- Open an issue in the [Issues](https://github.com/your-username/my-project/issues) tab and tag it as an `enhancement`.

## Label Definitions

Please tag issues and pull requests appropriately, based on the definition below:
- **plugin**: A plugin contribution.
- **bug**: A problem that needs fixing.
- **enhancement**: A requested enhancement.
- **help wanted**: A task that is open for anyone to work on.
- **documentation**: Documentation changes.
13 changes: 13 additions & 0 deletions examples/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "examples",
"private": true,
"dependencies": {
"@virtuals-protocol/game": "^0.1.6",
"twitter-api-v2": "^1.15.0",
"@virtuals-protocol/game-twitter-plugin": "^0.1.1"
},
"scripts": {
"start": "ts-node -P ./tsconfig.json",
"build": "tsc -p ./tsconfig.json"
}
}
File renamed without changes.
11 changes: 11 additions & 0 deletions examples/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../", // Look up one directory to include everything
"outDir": "./dist"
},
"include": [
"./**/*", // Include all example files
"../plugins/**/example.ts" // Include plugin examples
]
}
File renamed without changes.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
"devDependencies": {
"@types/jsonwebtoken": "^9.0.7",
"@types/node": "^22.10.3",
"tsup": "^8.3.5",
"ts-node-dev": "^2.0.0",
"typescript": "^5.7.2"
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"@virtuals-protocol/game-twitter-plugin": "^0.1.1"
},
"dependencies": {
"axios": "^1.7.9"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/* Modules */
"module": "commonjs" /* Specify what module code is generated. */,
"rootDir": "./src" /* Specify the root folder within your source files. */,
"rootDir": "./" /* Specify the root folder within your source files. */,
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
Expand Down

0 comments on commit 9b4d5b5

Please sign in to comment.