感谢你考虑为 IJS 项目做出贡献!
参与本项目即表示你同意遵守我们的行为准则。请保持友好、尊重和包容。
如果你发现了 Bug,请创建一个 Issue 并包含以下信息:
如果你有新功能的想法:
Fork 仓库
# 在 GitHub 上点击 Fork 按钮
克隆你的 Fork
git clone https://github.com/your-username/ijs.git
cd ijs
创建分支
git checkout -b feature/your-feature-name
# 或
git checkout -b fix/your-bug-fix
进行更改
测试你的更改
./gradlew test
./gradlew connectedAndroidTest
提交更改
git add .
git commit -m "feat: add amazing feature"
推送到你的 Fork
git push origin feature/your-feature-name
创建 Pull Request
使用 Conventional Commits 格式:
<type>(<scope>): <subject>
<body>
<footer>
类型(type):
feat: 新功能fix: Bug 修复docs: 文档更新style: 代码格式(不影响代码运行)refactor: 重构perf: 性能优化test: 测试相关chore: 构建过程或辅助工具的变动示例:
feat(plot): add parametric plot support
Add ParametricPlot function to draw parametric equations.
Supports custom parameter ranges and point density.
Closes #123
添加 JavaDoc 注释
/**
* 计算函数的导数
*
* @param expression 函数表达式
* @param variable 变量名
* @return 导数表达式
*/
public String differentiate(String expression, String variable) {
// 实现代码
}
添加 JSDoc 注释
/**
* 绘制函数图像
* @param {string} func - 函数表达式
* @param {string} variable - 变量名
* @param {number} xMin - x 最小值
* @param {number} xMax - x 最大值
*/
plotFunction(func, variable, xMin, xMax) {
// 实现代码
}
安装 Android Studio
克隆仓库
git clone https://github.com/your-username/ijs.git
cd ijs
打开项目
运行应用
ijs/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/com/nonvioce/ijs/
│ │ │ │ ├── MainActivity.java # 主活动
│ │ │ │ ├── SymjaEngine.java # Symja 引擎封装
│ │ │ │ └── PluginManager.java # 插件管理器
│ │ │ ├── assets/
│ │ │ │ ├── console.html # 控制台 HTML
│ │ │ │ ├── console.css # 控制台样式
│ │ │ │ └── console.js # 控制台逻辑
│ │ │ └── res/ # Android 资源
│ │ ├── androidTest/ # Android 测试
│ │ └── test/ # 单元测试
│ └── build.gradle.kts # 应用构建配置
├── gradle/ # Gradle 配置
├── README.md # 项目说明
├── CHANGELOG.md # 更新日志
└── CONTRIBUTING.md # 贡献指南
如果你想开发插件:
app/src/main/assets/console.html 中的插件开发文档{
"id": "unique_plugin_id",
"name": "插件名称",
"description": "插件描述",
"icon": "📐",
"command": "cmd",
"inputs": [
{
"name": "input_name",
"label": "输入标签",
"type": "number",
"defaultValue": "0",
"placeholder": "提示文本"
}
],
"jsCode": "function calculate(inputs, Symja) { ... }"
}
(仅限维护者)
如果你需要帮助:
通过贡献代码,你同意你的贡献将在 GPL-3.0 许可证下发布。
再次感谢你的贡献!🎉