aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Shaked2020-04-11 13:12:36 +0300
committerUri Shaked2020-04-11 13:12:36 +0300
commit45fe4ce270482a8b6cfb6e7d6b66f53363502edc (patch)
tree24815ecf708d7648d6cf863d790f0c6e17708d1e
parentchore: release 0.7.0 (diff)
downloadavr8js-45fe4ce270482a8b6cfb6e7d6b66f53363502edc.tar.gz
avr8js-45fe4ce270482a8b6cfb6e7d6b66f53363502edc.tar.bz2
avr8js-45fe4ce270482a8b6cfb6e7d6b66f53363502edc.zip
doc: add Contributing Guide
close #23
Diffstat (limited to '')
-rw-r--r--CONTRIBUTING.md83
-rw-r--r--README.md4
2 files changed, 86 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..c9d1490
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,83 @@
+# Contributing to AVR8js
+
+First of all, thank you for considering contributing to AVR8js!
+Please go over these guidelines to ensure that your contribution lands
+successfully.
+
+## How to Contribute
+
+Before starting to work on a new feature, please
+[file an issue](https://github.com/wokwi/avr8js/issues/new)
+to discuss the implementation.
+
+## Setting-up Your Environment
+
+The source code is written in the [TypeScript](https://www.typescriptlang.org/) language, a typed
+extension of JavaScript.
+
+In addition, we use the following tools:
+* [prettier](https://prettier.io/) to keep the code pretty
+* [eslint](https://eslint.org/) to keep the code consistent and clean
+* [editorconfig](https://editorconfig.org/) to keep indentation consistent across different editors
+* [jest](https://jestjs.io/) for the unit tests
+
+If you open this project with [Visual Studio Code](https://code.visualstudio.com/), you will be prompted
+to install the [relevant extensions](.vscode/extensions.json) for these tools.
+
+Finally, we recommend using [Wallaby.js](https://wallabyjs.com/) to run the tests automatically
+as you write the code. It should work out of the box with this repo, without any extra configuration.
+You can also run the tests manually, from the commandline (see below).
+
+## Running the Demo Project
+
+The demo project allows you to edit Arduino code, compile it, and run it in the simulator.
+It also simulates 2 LEDs connected to pins 12 and 13 (PB4 and PB5). To run it, simply execute
+
+```
+npm start
+```
+
+Then go to http://localhost:1234/ to interact with the project.
+
+The demo project is packaged using [parcel](https://parceljs.org/) and uses the
+[Monaco Editor](https://microsoft.github.io/monaco-editor/) for the interactive
+code editor, and the [Wokwi Elements library](https://www.npmjs.com/package/@wokwi/elements)
+for displaying the LEDs.
+
+## Running The Tests
+
+Run the tests once:
+
+```
+npm test
+```
+
+Run the tests of the files you modified since last commit (watch mode):
+
+```
+npm run test:watch
+```
+
+## Reference Material
+
+The following datasheets can be useful when working on new AVR8js features
+or fixing existing code:
+
+* [ATmega48A/PA/88A/PA/168A/PA/328/P Datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf)
+* [The AVR Istruction Set Manual](http://ww1.microchip.com/downloads/en/devicedoc/atmel-0856-avr-instruction-set-manual.pdf)
+* [ ATmega640/V-1280/V-1281/V-2560/V-2561/V Datasheet](https://ww1.microchip.com/downloads/en/devicedoc/atmel-2549-8-bit-avr-microcontroller-atmega640-1280-1281-2560-2561_datasheet.pdf)
+
+## Coding Guidelines
+
+Please make sure to follow these guidelines when contributing code:
+
+1. You include a relevant test case. Ideally the test case would fail before
+ your code changes, and pass after implementing the change.
+2. Your commit messages should follow the [conventional commits
+ standard](https://www.conventionalcommits.org/), e.g.:
+ `feat(instruction): implement EICALL, EIJMP`
+3. The contributed code has to be compatible with the MIT license. If your
+ work incoporates some third-party code, please make sure that their
+ license is compatible and that you credit appropriately.
+
+Thank you!
diff --git a/README.md b/README.md
index f6d91fe..e3c21d9 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,8 @@ Run the tests of the files you modified since last commit (watch mode):
npm run test:watch
```
+For more information, please check the [Contributing Guide](CONTRIBUTING.md).
+
## License
-Copyright (C) 2019, Uri Shaked. The code is released under the terms of the MIT license. \ No newline at end of file
+Copyright (C) 2019, 2020 Uri Shaked. The code is released under the terms of the MIT license. \ No newline at end of file
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.