-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for custom boards in the cli #183
Conversation
hey @JordiChauzi this new feature is awesome and I love the code and error messages! I think you were right to point out the issue of the board spec technically being invalid JSON. What I'm going to propose is to switch to a .js file instead, and document (in the README) the general idea of how to create this file. We can point the user to the custom board section of the README rather than reinvent the wheel so they can learn how to do this. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for making these changes! I'm ready to merge and release these changes if you're comfortable with that!
Yep, this seems logical. |
All is good on my side! |
Fixes #97
This PR allows to provide a custom board specification in the CLI, eg:
This change being in the CLI part, I am not sure what is the appropriate way to test it.
There is currently not a lot of documentation for custom boards (looking at you #151), so I did not add documentation on the expected JSON format. The only tricky part, I think, is the
signature
field where we create theBuffer
from the input JSON array. Maybe adding a CLI option to display the JSON specification for a supported board may help ?Maybe we want to the feature to the library part? It may make sense to handle the
Buffer
creation for the user.I tried to provide an accurate error message, but using the same argument, it is kind of hard to discriminate between a board name and a JSON file.