Skip to content
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

Tweak bb doc task that offers cljdoc previews #319

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

lread
Copy link
Contributor

@lread lread commented Jul 24, 2023

The doc command has the same commands.
Workflow remains:

  • bb doc start to start cljdoc docker image
  • while verifying, repeat:
    1. make some edits
    2. commit and push edits to branch
    3. bb doc ingest to locally install jar and then ingest it into cljdoc
    4. bb doc view to bring up docs in your browser (or if already open simply refresh them in browser)
  • when done: bb doc stop to stop cljdoc docker image

Because polylith generates 2 artifacts the ingest and view commands optionally take poly (the default) or api as an extra arg.

This effort was to get a preview flow working for polylith. We can address other issues, such as not documenting internal namespaces as a separate effort.

Some details:

  • cleaned out unused gunk from bb.edn, wasn't sure if tasks other than doc are needed, so left them in.
  • added install and version commands to build.clj
  • switched to modern bb-isms in cljdoc-preview.clj
    • switched from nubank/docopt to babashka/cli
    • switched from babashka/curl to babashka/http-client
    • took advantage of newer babashka/fs functions
    • turfed all my script helpers

The `doc` command has the same commands.
Workflow remains:

- `bb doc start` to start cljdoc docker image
- while verifying, repeat:
  1. make some edits
  2. commit and push edits to branch
  3. `bb doc ingest` to locally install jar and then ingest it into cljdoc
  4. `bb doc view` to bring up docs in your browser (or if already open
simply refresh them in browser)
- when done: `bb doc stop` to stop cljdoc docker image

Because polylith generates 2 artifacts the `ingest` and `view` commands optionally
take `poly` (the default) or `api` as an extra arg.

This effort was to get a preview flow working for polylith.
We can address other issues, such as not documenting internal namespaces
as a separate effort.

Some details:
- cleaned out unused gunk from `bb.edn`, wasn't sure if tasks other than
`doc` are needed, so left them in.
- added `install` and `version` commands to `build.clj`
- switched to modern bb-isms in `cljdoc-preview.clj`
  - switched from nubank/docopt to babashka/cli
  - switched from babashka/curl to babashka/http-client
  - took advantage of newer babashka/fs functions
  - turfed all my script helpers
@tengstrand tengstrand merged commit 9567647 into polyfy:issue-318 Jul 25, 2023
tengstrand pushed a commit that referenced this pull request Aug 8, 2023
The `doc` command has the same commands.
Workflow remains:

- `bb doc start` to start cljdoc docker image
- while verifying, repeat:
  1. make some edits
  2. commit and push edits to branch
  3. `bb doc ingest` to locally install jar and then ingest it into cljdoc
  4. `bb doc view` to bring up docs in your browser (or if already open
simply refresh them in browser)
- when done: `bb doc stop` to stop cljdoc docker image

Because polylith generates 2 artifacts the `ingest` and `view` commands optionally
take `poly` (the default) or `api` as an extra arg.

This effort was to get a preview flow working for polylith.
We can address other issues, such as not documenting internal namespaces
as a separate effort.

Some details:
- cleaned out unused gunk from `bb.edn`, wasn't sure if tasks other than
`doc` are needed, so left them in.
- added `install` and `version` commands to `build.clj`
- switched to modern bb-isms in `cljdoc-preview.clj`
  - switched from nubank/docopt to babashka/cli
  - switched from babashka/curl to babashka/http-client
  - took advantage of newer babashka/fs functions
  - turfed all my script helpers
tengstrand pushed a commit that referenced this pull request Aug 22, 2023
The `doc` command has the same commands.
Workflow remains:

- `bb doc start` to start cljdoc docker image
- while verifying, repeat:
  1. make some edits
  2. commit and push edits to branch
  3. `bb doc ingest` to locally install jar and then ingest it into cljdoc
  4. `bb doc view` to bring up docs in your browser (or if already open
simply refresh them in browser)
- when done: `bb doc stop` to stop cljdoc docker image

Because polylith generates 2 artifacts the `ingest` and `view` commands optionally
take `poly` (the default) or `api` as an extra arg.

This effort was to get a preview flow working for polylith.
We can address other issues, such as not documenting internal namespaces
as a separate effort.

Some details:
- cleaned out unused gunk from `bb.edn`, wasn't sure if tasks other than
`doc` are needed, so left them in.
- added `install` and `version` commands to `build.clj`
- switched to modern bb-isms in `cljdoc-preview.clj`
  - switched from nubank/docopt to babashka/cli
  - switched from babashka/curl to babashka/http-client
  - took advantage of newer babashka/fs functions
  - turfed all my script helpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants