First off, thank you for considering contributing to FigwheelMain! Your efforts are greatly appreciated and help make this project better for everyone.
- Code of Conduct
- How Can I Contribute?
- Development Setup
- Coding Guidelines
- Testing
- Style Guides
- Additional Notes
Please read and follow our Code of Conduct to ensure a welcoming and respectful environment for all contributors.
There are many ways to contribute to FigwheelMain, whether it's improving documentation, reporting issues, suggesting new features, or contributing code. Here's how you can get started:
If you find a bug in FigwheelMain, please open an issue with the following information:
- A clear and descriptive title
- A detailed description of the problem
- Steps to reproduce the issue
- Expected vs. actual behavior
- Environment information (e.g., OS, version of FigwheelMain, etc.)
Before creating a new issue, please search existing issues to see if someone else has already reported the problem.
Have an idea to make FigwheelMain better? We'd love to hear it! When suggesting enhancements, please:
- Provide a clear and descriptive title
- Describe the enhancement in detail
- Explain the benefit of the enhancement
- Include any relevant examples or use cases
Feature requests are also welcome. Follow the same guidelines as suggesting enhancements to ensure your request is clear and actionable.
Contributions in the form of pull requests are highly appreciated. Here's how to proceed:
- Fork the repository to your own GitHub account.
- Clone your fork to your local machine:
git clone https://github.com/your-username/figwheel-main.git
- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
- Make your changes following the coding guidelines.
- Commit your changes with a clear and descriptive commit message:
git commit -m "Add feature: your feature description"
- Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request on the main repository, providing a detailed description of your changes and referencing any related issues.
Please ensure your pull request adheres to the requirements outlined in this document.
The folowing steps are a simple way to set up a local development environment:
-
Clone the repositories:
git clone https://github.com/bhauman/figwheel-core.git git clone https://github.com/bhauman/figwheel-repl.git git clone https://github.com/bhauman/figwheel-main.git
-
Create a figwheel-main project The easiest way to do this is to use https://github.com/bhauman/figwheel-main-template
lein new figwheel-main work-on-figwheel.core -- +deps --react
or
clj -Tclj-new create :template figwheel-main :name work-on-figwheel/work-on-figwheel :args '["+lein", "--react"]'
-
Edit deps.edn files so that they are referencing local code
Edit
work-on-figwheel.core/deps.edn
so that it references the local figwheel-main:Change this entry:
com.bhauman/figwheel-main {:mvn/version "0.2.20"}
to
com.bhauman/figwheel-main {:local/root "../figwheel-main"}
Edit
figwheel-main/deps.edn
file so that references the localfigwheel-repl
andfigwheel-core
Change these entries
;; DEV for now its easier to use cider with top level deps ;; com.bhauman/figwheel-core {:local/root "../figwheel-core"} ;; com.bhauman/figwheel-repl {:local/root "../figwheel-repl"} com.bhauman/figwheel-repl {:mvn/version "0.2.21-SNAPSHOT"} com.bhauman/figwheel-core {:mvn/version "0.2.21-SNAPSHOT"}
by uncommenting the DEV entries with
:local/root
in them and commenting out the:mvn/version
entries like so:;; DEV for now its easier to use cider with top level deps com.bhauman/figwheel-core {:local/root "../figwheel-core"} com.bhauman/figwheel-repl {:local/root "../figwheel-repl"} ;; com.bhauman/figwheel-repl {:mvn/version "0.2.21-SNAPSHOT"} ;; com.bhauman/figwheel-core {:mvn/version "0.2.21-SNAPSHOT"}
-
Run the generated figwheel-main project
Check to see that everything is setup correctly by running your local figwheel-main project.
cd work-on-figwheel.core clojure -M:fig:build
The project should be up and building.
You can now stop the build and make your changes and restart it to see the effects.
Or you can setup an editor repl into this process and hot reload changes into it.
To maintain consistency and quality across the project, please adhere to the following coding guidelines:
- Language: Primarily Clojure and ClojureScript.
- Formatting: Follow cljfmt styles.
- Naming Conventions:
- Use
kebab-case
for functions and variables. - Use
CamelCase
for namespaces, types, and protocols.
- Use
- Code Structure:
- Keep functions small and focused.
- Avoid deep nesting; refactor into smaller functions if necessary.
Adhering to style guides improves readability and maintainability. Please follow these guidelines:
- Indentation: Use 2 spaces per indentation level.
- Line Length: Keep lines under 80 characters where possible.
- Whitespace: Use blank lines to separate logical blocks of code.
Consider using tools like cljfmt and for automated formatting and linting.
- Stay Updated: Regularly sync with the main repository to stay updated on the latest changes.
git fetch upstream git checkout main git merge upstream/main
- Ask Questions: If you're unsure about something, feel free to open an issue or join the community discussions.
- Respect Licensing: Ensure that your contributions comply with the project's licensing terms. FigwheelMain is licensed under the Eclipse Public License.
Thank you again for your interest in contributing to FigwheelMain!
This project is licensed under the Eclipse Public License.
Special thanks to all the contributors who have made this project possible.
For any queries or support, please reach out via issues or join our community channels.
If you have any suggestions for improving this document, feel free to open a pull request or issue.