Skip to content

Commit

Permalink
docs: move example up
Browse files Browse the repository at this point in the history
Mostly to trigger a new run of the release job :P
  • Loading branch information
wkillerud committed Mar 12, 2024
1 parent 369c817 commit bde09e9
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@ async function doParse() {
doParse();
```
Or sync
```ts
import { parseSync } from "scss-sassdoc-parser";

const result = parseSync(`
/// Keeps it secret
/// @output Sets display to hidden
@mixin _keep-it-secret {
display: hidden;
}
`);
```
### Parse using paths
```ts
Expand All @@ -42,20 +56,6 @@ const singlePathResult = await doParse("_helpers.scss");
const arrayOfPathsResult = await doParse(["_mixins.scss", "_functions.scss"]);
```
### `parseSync`
```ts
import { parseSync } from "scss-sassdoc-parser";

const result = parseSync(`
/// Keeps it secret
/// @output Sets display to hidden
@mixin _keep-it-secret {
display: hidden;
}
`);
```
## Output
The result from the `parse` function is an array of [`ParseResult` (type definitions)](/src/types.ts#L87). Check out the [snapshot tests](/src/sassdoc-parser.test.ts) for some example outputs.

0 comments on commit bde09e9

Please sign in to comment.