Skip to content

Commit

Permalink
Merge pull request #72 from jannis-baum/issue/69-update-dependencies-…
Browse files Browse the repository at this point in the history
…readme

Update dependencies & README
  • Loading branch information
jannis-baum authored Jul 14, 2024
2 parents 09e4264 + 0051013 commit 26421fa
Show file tree
Hide file tree
Showing 11 changed files with 458 additions and 677 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "🪲 Bug report"
about: Create a report to help us improve
title: ''
labels: bug
labels: 'type:bug'
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "✨ Feature request"
about: Suggest an idea for this project
title: ''
labels: feature
labels: 'type:feature'
assignees: ''

---
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: vivify-linux
path: build/linux/*
path: build/linux

build-macos:
name: Build MacOS
Expand All @@ -55,7 +55,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: vivify-macos
path: build/macos/*
path: build/macos

release:
name: Release
Expand All @@ -67,16 +67,22 @@ jobs:
uses: actions/download-artifact@v4
with:
name: vivify-linux
path: .
path: ./vivify-linux
- name: download macos artifact
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/download-artifact@v4
with:
name: vivify-macos
path: .
path: ./vivify-macos
- name: fix permissions & archive
if: startsWith(github.ref, 'refs/tags/v')
run: |
chmod +x ./vivify-linux/* ./vivify-macos/*
zip -r vivify-linux.zip vivify-linux
zip -r vivify-macos.zip vivify-macos
- name: release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: vivify-*.zip
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ yarn viv
instead of your installed Vivify executable. This will (1) connect to the
development server on port 3000 instead of running the installed server, and (2)
use the `viv` executable in the repository.

## Testing rendering

You can find files to test Vivify's rendering/parsing capabilities in the
[`tests/`](tests/) directory. Please make sure to add to this in case you add
anything new related to this.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Vivify

Vivify brings your (Markdown) files to life in the browser!
Vivify brings your files to life in the browser! Vivify is primarily made to
render Markdown and Jupyter Notebooks, but will also serve as a directory
browser and let you view code files with syntax highlighting. See below for
features!

## Features

- various [Markdown features](#markdown)
- links to other files: [relative links like in
GitHub](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#relative-links)
as well as absolute file links
- view non-markdown files with code syntax highlighting
- view Markdown with various [features](#markdown-features)
- view Jupyter Notebooks
- view other plain text files with code syntax highlighting
- view & navigate directories, hidden "back to parent directory" button at the
top-left of the file viewer
- easy to integrate with any editor for live synchronization (see [editor
Expand All @@ -21,18 +22,16 @@ If you need any additional features, feel free to [open an
issue](https:/jannis-baum/vivify/issues/new/choose) or
[contribute](CONTRIBUTING.md)!

### Markdown
### Markdown features

- heading/anchor links
- [Katex math](https://katex.org)
- [GitHub-style
task-lists](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#task-lists)
- [GitHub-style emojis like
`:smile:`](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#using-emojis)
- syntax highlighting for code
- full [basic](https://www.markdownguide.org/basic-syntax/) and
[extended](https://www.markdownguide.org/extended-syntax/) syntax support
- [KaTeX math](https://katex.org)
- [graphviz/dot graphs](https://graphviz.org/doc/info/lang.html)
- [Pandoc-style definition/description
lists](https://pandoc.org/MANUAL.html#extension-definition_lists)
- `<kbd>` tags, e.g. to style keyboard shortcuts
- links to other files: [relative links like in
GitHub](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#relative-links)
as well as absolute file links

### Editor Support

Expand Down Expand Up @@ -120,7 +119,7 @@ directory as an argument! See below for installation options.
## Get help

Is something not working or do you have any questions? [Start a
discussion!](https:/jannis-baum/vivify/discussions/new?category=q-a)!
discussion!](https:/jannis-baum/vivify/discussions/new?category=q-a)

## Acknowledgments

Expand Down
27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended',
),
{
languageOptions: {
parser: tsParser,
},
},
];

48 changes: 25 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,45 @@
"lint": "eslint src static"
},
"dependencies": {
"@viz-js/viz": "^3.1.0",
"@viz-js/viz": "^3.7.0",
"ansi_up": "^6.0.2",
"express": "^4.18.2",
"highlight.js": "^11.8.0",
"katex": "^0.15.6",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.6.7",
"express": "^4.19.2",
"highlight.js": "^11.10.0",
"katex": "^0.16.11",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.0.1",
"markdown-it-deflist": "^3.0.0",
"markdown-it-emoji": "^2.0.2",
"markdown-it-emoji": "^3.0.0",
"markdown-it-footnote": "^4.0.0",
"markdown-it-inject-linenumbers": "^0.3.0",
"markdown-it-task-lists": "^2.1.1",
"markdown-it-texmath": "^1.0.0",
"node-stream-zip": "^1.15.0",
"tmp": "^0.2.3",
"uuid": "^9.0.0",
"ws": "^8.13.0"
"uuid": "^10.0.0",
"ws": "^8.18.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.6.0",
"@jupyterlab/nbformat": "^4.2.3",
"@types/express": "^4.17.17",
"@types/markdown-it": "^12.2.3",
"@types/node": "^20.4.2",
"@types/express": "^4.17.21",
"@types/markdown-it": "^14.1.1",
"@types/node": "^20.14.10",
"@types/tmp": "^0.2.6",
"@types/uuid": "^9.0.2",
"@types/ws": "^8.5.5",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^5.0.0",
"nodemon": "^3.0.1",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"eslint": "^9.6.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"nodemon": "^3.1.4",
"postject": "^1.0.0-alpha.6",
"prettier": "^3.0.0",
"prettier": "^3.3.2",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.1",
"typescript": "^5.1.6",
"ts-node": "^10.9.2",
"typescript": "^5.5.3",
"webpack": "^5.92.1",
"webpack-cli": "^5.1.4"
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ server.listen(process.env['VIV_PORT'], async () => {
console.log(`App is listening on port ${process.env['VIV_PORT']}!`);
});

let shutdownTimer: NodeJS.Timer | null = null;
let shutdownTimer: NodeJS.Timeout | null = null;
export const { clientsAt, messageClientsAt } = setupSockets(
server,
() => {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mdit.use(anchor, {
}),
});
/* eslint-disable @typescript-eslint/no-var-requires */
mdit.use(require('markdown-it-emoji'));
mdit.use(require('markdown-it-emoji').full);
mdit.use(require('markdown-it-task-lists'));
mdit.use(require('markdown-it-footnote'));
mdit.use(require('markdown-it-inject-linenumbers'));
Expand Down
Loading

0 comments on commit 26421fa

Please sign in to comment.