Last updated: August 25th, 2024 📖
Thank you for considering contributing to NetPad! We’re excited to have you join the project.
- How to Contribute
- Submitting Changes
- Creating a Development Environment
- Issue Reporting
- Documentation Guidelines
- License
- Contact
- Acknowledgments
- Report bugs or request features through the issue tracker.
- Fork the repository, create a branch, make your changes, and submit a pull request to the
main
branch.
- Branching Strategy: Create a branch for your work
- For new features or changes use the
feat/
prefix, example:feat/my-new-feature
- For bugs or fixes use the
fix
prefix, example:fix/my-fix
- For new features or changes use the
- Commit Messages: Follow this format:
Add contributing guidelines
. - Pull Requests: Ensure your PR includes tests and follows our coding standards. A small description of the changes as well as the issue number (if applicable).
Added contributing guidelines to make it easier for new contributors to get started.
Changes Made:
- Added a new CONTRIBUTING.md file.
- Updated the README.md file to include a link to the new CONTRIBUTING.md file.
- Node v18.20+ (npm v10.7+)
- .NET SDK 7.x
- EF Core tools (.NET 5 or later)
- Fork and clone the repository and navigate to the project directory.
git clone https://github.com/tareqimbasher/NetPad.git && cd NetPad
- Run the SPA (Single Page Application)
# Install dependencies
cd src/Apps/NetPad.Apps.App/ElectronHostHook
npm install
cd ../App
npm install
# Start the development web server
npm start
- Run the .NET app Install the Electron.NET CLI tool
Important
To be able to run the electronize command with Electron.NET CLI, you need to have .NET 6 SDK installed.
dotnet tool install ElectronNET.CLI -g
- Start the app
Note
The very first electronize start
is slow. Later runs are much faster!
cd src/Apps/NetPad.Apps.App/
# Start in watch mode (remove '/watch' to run without watch mode)
electronize start /watch /manifest electron.manifest.dev.js
# For macOS ARM, append the following to the 'electronize start' command
/target custom "osx-arm64;mac" /electron-arch arm64
Note
SQLite database connections are not supported when NetPad is ran as a web app in the browser.
- Run the SPA (Single Page Application)
# Install dependencies
cd src/Apps/NetPad.Apps.App/
npm install
- Start the development web server
cd src/Apps/NetPad.Apps.App/
dotnet watch run --environment Development
Access the app via your web browser at http://localhost:57940.
The Electron app is built and packaged using
electron-builder. Configuration is in the electron.manifest.js
file.
Build the app for the desired platform from the root directory of the NetPad.Apps.App
project:
# For x64:
electronize build /target win /manifest electron.manifest.js /PublishSingleFile false
electronize build /target osx /manifest electron.manifest.js /PublishSingleFile false
electronize build /target linux /manifest electron.manifest.js /PublishSingleFile false
# For macOS ARM:
electronize build /target custom "osx-arm64;mac" /electron-arch arm64 /manifest electron.manifest.js /PublishSingleFile false
Packaged files can be found in the bin/Desktop
folder.
Note
To Build flatpak
files the flatpak
and flatpak-builder
packages need to be installed. On Linux, the /scripts/package-electron.sh
script can be used to package the Electron app, in which case packaged files can be found in the /dist/
folder.
See the Electron.NET docs for additional CLI options when packaging the app, and electron-builder for additional configuration options.
- Bug Reports: Include steps to reproduce and environment details.
- Feature Requests: Clearly describe the feature and why it’s needed.
Documentation contributions are welcome. And includes in the /docs
directory as well as in the README.md and CONTRIBUTING.md files.
- Don't add images or other media files with excessive size.
- Use camelCase for directory names.
- Use Title Case for file names.
Important
The naming conventions mentioned above do not apply for the .NET projects nor the Electron projects. Follow the conventions of the respective technologies.
By contributing, you agree that your contributions will be licensed under the MIT LICENSE.
If you have any questions, feel free to open an issue or contact us at our Discord Server
At our Discord, you can find the latest announcements, troubleshooting, ideas and feedback, and more.