Skip to content

Commit

Permalink
chore: 🔧 added bonnie setup script to prepare local dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-hen7 committed Oct 7, 2021
1 parent 241741f commit 3b3dae5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ That's fantastic! You can check out the [roadmap](./README.md#Roadmap) or the [i

## How do I contribute?

Contributing to a project on Github is pretty straight forward. If this is you're first time contributing to a project, all you need to do is fork this repository to your own GitHub account, add then change the code you want to (usually on your local machine, you'd pull your fork down). Commit your changes as necessary, and when you're done, submit a pull request on this repository and we'll review it as soon as possible!
Contributing to a project on Github is pretty straight forward. If this is you're first time contributing to a project, all you need to do is fork this repository to your own GitHub account and then change the code you want to (usually on your local machine, you'd pull your fork down). Commit your changes as necessary, and when you're done, submit a pull request on this repository and we'll review it as soon as possible!

Make sure your code doesn't break anything existing, that all tests pass, and, if necessary, add tests so your code can be confirmed to work automatically.

Expand All @@ -24,6 +24,8 @@ Perseus uses [Bonnie](https://github.com/arctic-hen7/bonnie) for command aliasin

- `bonnie dev example showcase serve` -- serves the `showcase` example to <http://localhost:8080>

Before you do anything though, you should run `bonnie setup`, which will do a few thigns to prepare your local development. This includes running `cargo build`, so it will takea a little while. Note that, without running this command, most other actions you try to take will cause errors.

## Testing

Nearly all Perseus' tests are end-to-end, and run using the Perseus test macro for each example (under `examples`). You can run all tests with `bonnie test`, provided that you're running a WebDriver instance at <http://localhost:4444>.
Expand Down
12 changes: 12 additions & 0 deletions bonnie.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
version="0.3.2"

[scripts]
setup.cmd = [
# Create the dist directories for the CLI in the `basic` example
# These are gitignored, and so not placed into Git unfortunately
"mkdir -p examples/basic/.perseus/dist",
"mkdir -p examples/basic/.perseus/dist/static",
"mkdir -p examples/basic/.perseus/dist/exported",
"bonnie copy-subcrates",
"cargo build",
"echo \"\n\nThe Perseus repository is ready for local development! Type 'bonnie help' to see the available commands you can run here. Also, please ensure that you have 'npx' available and that you've installed 'tailwindcss' ('npm i -g tailwindcss') if you'll be working with the website.\""
]
setup.desc = "sets everything up for local development"

dev.subcommands.cli.cmd = [
"cd packages/perseus-cli",
# We need to copy in the directory where we actually work on the subcrate
Expand Down

0 comments on commit 3b3dae5

Please sign in to comment.