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

fix: adjust readme to adhere to jetbrains marketplace guidelines #115

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Plugin description -->

<p align="center">
<img src ="https://github.com/michaelangeloio/does-it-throw/blob/main/assets/icon-small.png?raw=true" width='350'>
</p>
Expand All @@ -8,10 +8,12 @@
<img src="https://github.com/michaelangeloio/does-it-throw/actions/workflows/ts.yaml/badge.svg" alt="TypeScript Build Status">
</p>

<!-- JetBrains Plugin description 1 -->
# Well, Does it Throw?

TLDR; This is a *blazingly* fast **lsp server** to find *throw statements* in your javascript code. It's written in Rust and based on [SWC](https://swc.rs/) 🔥. It works for most ECMAScript files, such as `.ts`, `.js`, `.tsx` and `.jsx`.

<!-- JetBrains Plugin description end 1 -->

### Check it out in action:

Expand All @@ -21,7 +23,7 @@ Also supports **call expressions**:

![demo](./assets/calltothrow.gif)


<!-- JetBrains Plugin description 2 -->
## Why?

Maybe you're working on a large codebase riddled with throw statements everywhere, and you want a better control flow. Or perhaps you're just curious about how many throw statements you have in your codebase. This simple tool can help you with that.
Expand All @@ -38,7 +40,7 @@ Untyped `throw` statements can be a pain for those who come from languages like
| VsCode | [Marketplace](https://marketplace.visualstudio.com/items?itemName=michaelangeloio.does-it-throw-vscode) |
| Neovim | [Neovim Installation Docs](https://github.com/michaelangeloio/does-it-throw/blob/main/docs/neovim.md) |
| LSP Server | [NPM](https://www.npmjs.com/package/does-it-throw-lsp) |
| JetBrains | Coming soon... |
| JetBrains | [Marketplace](https://plugins.jetbrains.com/plugin/23434-does-it-throw-?noRedirect=true) |

> This extension is built with security in mind. It doesn't send any data to any third party servers. All publishes are done via a signed immutable commit from the [CI pipeline](https://github.com/michaelangeloio/does-it-throw/actions/workflows/release-vsix.yaml).

Expand Down Expand Up @@ -70,4 +72,4 @@ Please use the GitHub discussions tab to provide feedback and suggestions. Thank

## License
MIT - See [LICENSE](https://github.com/michaelangeloio/does-it-throw/blob/main/LICENSE.txt) for more information.
<!-- Plugin description end -->
<!-- JetBrains Plugin description end 2 -->
16 changes: 13 additions & 3 deletions jetbrains/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,28 @@ tasks {
untilBuild.set("240.*")

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
val readMe = layout.projectDirectory.file(file("${project.projectDir}/../server/README.md").path)
val readMe = layout.projectDirectory.file(file("${project.projectDir}/../README.md").path)
println("readMe sourceDir: $readMe")
pluginDescription = providers.fileContents(readMe).asText.map {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
val start = "<!-- JetBrains Plugin description 1 -->"
val end = "<!-- JetBrains Plugin description end 1 -->"

with (it.lines()) {
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
}

val start2 = "<!-- JetBrains Plugin description 2 -->"
val end2 = "<!-- JetBrains Plugin description end 2 -->"

with (it.lines()) {
if (!containsAll(listOf(start2, end2))) {
throw GradleException("Plugin description section not found in README.md:\n$start2 ... $end2")
}
subList(indexOf(start2) + 1, indexOf(end2)).joinToString("\n").let(::markdownToHTML)
}
}

val changelog = project.changelog // local variable for configuration cache compatibility
Expand Down
Loading