Skip to content

Commit

Permalink
Rewrite documentation for the new Spago
Browse files Browse the repository at this point in the history
  • Loading branch information
f-f committed Sep 20, 2023
1 parent 2206c40 commit 5a2c2ca
Show file tree
Hide file tree
Showing 6 changed files with 819 additions and 1,253 deletions.
51 changes: 17 additions & 34 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,30 @@ If you wish to contribute documentation, [this is a suggested read](https://www.

## Developing `spago`

If you'd like to develop spago locally, the recommended tool to use is [stack][stack].
```bash
# Install dependencies
npm ci

We use `make` to coordinate the build, here's a compilation of useful targets:
# Bootstrap
spago bundle -p spago-bin

```bash
# To compile the project from source:
$ make
# From now on you can build with the local files in the output folder, e.g.:
./bin/index.dev.js bundle -p spago-bin
# Or from the built bundle:
./bin/bundle.js bundle -p spago-bin

# File-watching build:
$ make dev
# From now on you can use the bootstrapped build to see the changes you make:
./bin/index.dev.js some-new-command

# Running tests:
$ make test
# ...but you can of course still just use the global `spago` command:
spago build

# Installing system-wide the current build:
$ make install
# Can of course run the tests with
spago test
```

## Developing docs

If you edit any title in the readme, run `doctoc` to update the Table of Contents:

```bash
Expand All @@ -70,34 +76,12 @@ The following are recommendations to make using `yEd` easier/faster:
- ... and press <kbd>F2</kbd> to add text to that edge
- ... and press <kbd>F6</kbd> to edit its properties. Under the 'Label' tab, change the "Placement"'s "Model" dropdown to "Free" to get full control over where the edge's text can appear.

## Running tests

The CI runs the tests on new pull requests, so it's not possible to merge a change without them passing.

So you might want to run them locally. This is a way to do it:

```bash
# Build from source and install system-wide
$ stack install

# Install bower since end-to-end tests require it
$ npm install -g bower

# This runs the tests which make use of the `spago` executable
$ stack test

# A single test can be running by providing a pattern to the 'match' flag
$ stack test --test-arguments='--match "/Spago/spago run/Spago should use exec-args"'
```


## Merging changes

All changes must happen through a Pull Request.

Everyone with the "commit bit" can merge changes.


## How do I get the "commit bit"?

Just ask! I ([@f-f][f-f]) hand out the commit bit freely to anybody who
Expand All @@ -112,6 +96,5 @@ Learn by doing and get your hands dirty!


[f-f]: https://github.com/f-f
[stack]: http://haskellstack.org/
[discord]: https://purescript.org/chat
[spago-issues]: https://github.com/purescript/spago/issues
Loading

0 comments on commit 5a2c2ca

Please sign in to comment.