Skip to content

Commit

Permalink
[markdown] update example CSS/JS and add an example readme (#1970)
Browse files Browse the repository at this point in the history
Also fix the build
  • Loading branch information
kevmoo authored Jan 15, 2025
1 parent 6e74c97 commit 215e83b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Build the markdown playground.
- run: dart pub get
working-directory: pkgs/markdown
- run: dart run build_runner build -o example:build --release
- run: dart run build_runner build -o example:build --release --delete-conflicting-outputs --verbose
working-directory: pkgs/markdown

# Create the _site directory.
Expand Down
3 changes: 0 additions & 3 deletions pkgs/markdown/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
targets:
$default:
builders:
build_web_compilers|dart2js_archive_extractor:
options:
filter_outputs: false
build_web_compilers|entrypoint:
generate_for:
- example/**.dart
Expand Down
13 changes: 13 additions & 0 deletions pkgs/markdown/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Commands must be executed from the `/markdown` directory.

Run locally with JavaScript development compiler:

```console
dart run build_runner serve example
```

Build production JS and WebAssembly:

```console
dart run build_runner build -o example:build --release
```
8 changes: 4 additions & 4 deletions pkgs/markdown/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons+Extended">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/default.min.css" integrity="sha512-hasIneQUHlh06VNBe7f6ZcHmeRTLIaQWFd43YriJ0UND19bvYRauxthDg8E4eVNPm9bRUhr5JGeqH7FRFXQu5g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown-light.min.css" integrity="sha512-zb2pp+R+czM7GAemdSUQt6jFmr3qCo6ikvBgVU6F5GvwEDR0C2sefFiPEJ9QUpmAKdD5EqDUdNRtbOYnbF/eyQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js" integrity="sha512-yUUc0qWm2rhM7X0EFe82LNnv2moqArj5nro/w1bi05A09hRVeIZbN6jlMoyu0+4I/Bu4Ck/85JQIU82T82M28w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/languages/dart.min.js" integrity="sha512-14QR6tzX5xTNeMJKXzSK+xCquDvtNEr1jM5NlKy/149BBY50Kv70qqxHtzo6zClbtc1gIG7G0CGWXuMgPIMt0g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css" integrity="sha512-hasIneQUHlh06VNBe7f6ZcHmeRTLIaQWFd43YriJ0UND19bvYRauxthDg8E4eVNPm9bRUhr5JGeqH7FRFXQu5g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown-light.min.css" integrity="sha512-X175XRJAO6PHAUi8AA7GP8uUF5Wiv+w9bOi64i02CHKDQBsO1yy0jLSKaUKg/NhRCDYBmOLQCfKaTaXiyZlLrw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js" integrity="sha512-EBLzUL8XLl+va/zAsmXwS7Z2B1F9HUHkZwyS/VKwh3S7T/U0nF4BaU29EP/ZSf6zgiIxYAnKLu6bJ8dqpmX5uw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/dart.min.js" integrity="sha512-4NIdIujw2gXoLU7x+versij0q7JzrtjDETxeDaBIb2gM7EctoudrUUtWm+aTx9ODExJTTCLzq06Gjs642x/DwA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script defer src="app.dart.js"></script>
<title>Dart Markdown Live Editor</title>
<style>
Expand Down

0 comments on commit 215e83b

Please sign in to comment.