Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6e5810f
Add sort of impl for recursive scanning
mikhi32 Apr 26, 2023
8cf5f15
More simple functions
mikhi32 Apr 26, 2023
1ae1895
Remove check.ts, use external function instead
mikhi32 Apr 26, 2023
a43d2f1
rm fs-extra
mikhi32 Apr 26, 2023
0e2c112
add commments
mikhi32 Apr 26, 2023
4c8f9fa
Rm usless console.log
mikhi32 Apr 26, 2023
140d435
Add basic impl
mikhi32 Apr 29, 2023
31f6e44
Add title and template
mikhi32 Apr 29, 2023
d840834
Add css
mikhi32 May 1, 2023
45be495
Change foldersg
mikhi32 May 1, 2023
2a25ae3
Update deps
mikhi32 May 10, 2023
faafa0c
Update deps
mikhi32 Jun 9, 2023
226120c
Switch to tsup
mikhi32 Jun 9, 2023
12bd92c
Change entry point and other scriptsg
mikhi32 Jun 9, 2023
a5eeeb0
Switch off rollup
mikhi32 Jun 9, 2023
626fd69
Format code
mikhi32 Jun 9, 2023
1a9be83
Feature parity
mikhi32 Jun 9, 2023
cba79c9
Order Everything up
mikhi32 Jun 9, 2023
36bbbb4
Add not in readme
mikhi32 Jun 9, 2023
976eb81
Add return types and start tsdoc
mikhi32 Jun 9, 2023
e03abc0
Start documenting everything
mikhi32 Jun 17, 2023
eeb76d9
Fix bug of not awaiting the compile function
mikhi32 Jun 17, 2023
ad974ee
RM workflows
mikhi32 Jun 17, 2023
7916481
Add config using setso.config.json or setso.config.json5
mikhi32 Jun 17, 2023
88c0b1a
Fix readme
mikhi32 Jun 17, 2023
585bdd3
Ready for prerelease
mikhi32 Jun 17, 2023
8adc851
First beta release
mikhi32 Jun 17, 2023
4c843b2
Fix for beta
mikhi32 Jun 17, 2023
ea7e3eb
Order Everything up
mikhi32 Jun 17, 2023
e63861a
Add ts doc comments
mikhi32 Jun 18, 2023
0e57239
Add ts doc comments
mikhi32 Jun 18, 2023
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
36 changes: 0 additions & 36 deletions .github/workflows/check.yml

This file was deleted.

21 changes: 0 additions & 21 deletions docs/api/check.md

This file was deleted.

25 changes: 25 additions & 0 deletions docs/api/createEl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# createEl

Located in src/parts/getHtml.ts

```ts
async function createEl(body: string): Promise<string>;
```

Compiles mdx to normal markdown, even if mdx is not used.

For example:

```ts
import { createEl } from "./parts/getHtml.ts";

await getHtml(/*body*/);
```

Parameters:

body: The body to compile

Returns:

A promise with the compiled markdown
17 changes: 0 additions & 17 deletions docs/api/getConfig.md

This file was deleted.

31 changes: 31 additions & 0 deletions docs/api/getHtml.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# getHtml

Located in src/parts/getHtml.ts

```ts
async function getHtml(
file: string,
cssPath: string | undefined,
verbose: boolean
): Promise<string>;
```

Reads a markdown file and compiles it to html.

For example:

```ts
import { getHtml } from "./parts/getHtml.ts";

await getHtml(/*file*/, /*Css path, can be undefined */, /*verbose*/)
```

Parameters:

file: The file to compile
cssPath: The path to the corresponding css, if css is enebaled
verbose: Whether to be verbose or not.

Returns:

A promise with the compiled html
27 changes: 27 additions & 0 deletions docs/api/getTemplate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# getTemplate

Located in src/parts/getTemplate.ts

```ts
async function getTemplate(body: string, title: string, css: string): string;
```

Returns the full template to write to the final html file.

For example:

```ts
import { getTemplate } from "./parts/getTemplate.ts";

getTemplate(/*body*/, /*title*/, /*css*/)
```

Parameters:

body: The compiled body
title: The title of that page
css: The css to inject

Returns:

The full template.
16 changes: 0 additions & 16 deletions docs/api/handleArgs.md

This file was deleted.

40 changes: 24 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"name": "setso",
"license": "MIT",
"version": "0.6.0",
"version": "1.0.0-beta.1",
"description": "A small library to compile markdown to html in a ordered format.",
"main": "./bundle/bundle.js",
"main": "./bundle/index.js",
"type": "module",
"bin": {
"setso": "./bundle/bundle.js"
"setso": "./bundle/index.js"
},
"scripts": {
"dev": "pnpm build-fast && node .",
"build": "pnpm prepare && tsc && rollup -c && rimraf build",
"build-fast": "tsc && rollup -c && rimraf build",
"build": "pnpm prepare && pnpm build-fast",
"build-fast": "tsup-node src/index.ts --format esm --minify terser && cpy dist/index.js bundle --flat && rimraf dist",
"go": "pnpm build && pnpm publish",
"go-beta": "pnpm build && pnpm publish --tag beta",
"lint": "eslint src --fix",
"check": "pnpm check-code && pnpm check-docs",
"check-code": "prettier src --check",
Expand All @@ -30,25 +31,32 @@
"author": "micziz",
"dependencies": {
"@mdx-js/mdx": "^2.3.0",
"arg": "^5.0.2",
"dir-exists-safe": "^1.1.0",
"file-exists-safe": "^2.0.0",
"fs-extra": "^11.1.1",
"gray-matter": "^4.0.3",
"json5": "^2.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remark-gfm": "^3.0.1"
"remark-gfm": "^3.0.1",
"zod": "^3.21.4"
},
"devDependencies": {
"@chiogen/rollup-plugin-terser": "^7.1.3",
"@types/fs-extra": "^11.0.1",
"@types/node": "^18.15.11",
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"eslint": "^8.37.0",
"@types/node": "^18.16.16",
"@types/react": "^18.2.9",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"cpy-cli": "^4.2.0",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"prettier": "^2.8.7",
"prettier": "^2.8.8",
"rimraf": "^4.4.1",
"rollup": "^3.20.2",
"sass": "^1.60.0",
"sass": "^1.63.2",
"terser": "^5.17.7",
"tsup": "^6.7.0",
"typescript": "^4.9.5"
}
}
Loading