From 3b3dae5c8e4132aa09ea4a5991c261ee99841991 Mon Sep 17 00:00:00 2001 From: arctic_hen7 Date: Fri, 8 Oct 2021 06:45:30 +1100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A7=20added=20bonnie=20setup?= =?UTF-8?q?=20script=20to=20prepare=20local=20dev=20environment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 4 +++- bonnie.toml | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8da6a4ba3..6449c003c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. @@ -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 +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 . diff --git a/bonnie.toml b/bonnie.toml index ac7bc9aec1..b53aa18b68 100644 --- a/bonnie.toml +++ b/bonnie.toml @@ -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