Skip to content

Commit

Permalink
recreate @primate/markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
terrablue committed Aug 4, 2024
1 parent 7f50ab7 commit d244359
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 29 deletions.
4 changes: 0 additions & 4 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"handlebars": "4",
"htmx-esm": "0.2",
"linkedom-global": "1",
"marked": "13",
"primate": "workspace:^",
"react": "18",
"react-dom": "18",
Expand Down Expand Up @@ -79,9 +78,6 @@
"linkedom-global": {
"optional": true
},
"marked": {
"optional": true
},
"react": {
"optional": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/server/markdown/dependencies.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/frontend/src/server/markdown/name.js

This file was deleted.

10 changes: 0 additions & 10 deletions packages/frontend/src/server/markdown/public/default.js

This file was deleted.

8 changes: 0 additions & 8 deletions packages/frontend/src/server/markdown/public/runtime.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/frontend/src/server/markdown/serve/index.js

This file was deleted.

44 changes: 44 additions & 0 deletions packages/markdown/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@primate/markdown",
"version": "0.4.0",
"description": "Primate Markdown frontend",
"bugs": "https://github.com/primatejs/primate/issues",
"license": "MIT",
"files": [
"src/**/*.js",
"!src/**/*.spec.js"
],
"repository": {
"type": "git",
"url": "https://github.com/primatejs/primate",
"directory": "packages/markdown"
},
"dependencies": {
"@primate/core": "workspace:^"
},
"peerDependencies": {
"marked": "13",
"primate": "workspace:^"
},
"type": "module",
"imports": {
"#*": {
"@primate/lt": "./src/private/*.js",
"default": "./src/private/*.js"
},
"#build": {
"@primate/lt": "./src/private/build/index.js",
"default": "./src/private/build/index.js"
},
"#serve": {
"@primate/lt": "./src/private/serve/index.js",
"default": "./src/private/serve/index.js"
}
},
"exports": {
".": {
"runtime": "./src/public/runtime.js",
"default": "./src/public/default.js"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import compile from "#compile";
import name from "#markdown/name";
import name from "#name";
import compile from "@primate/frontend/core/compile";
import server from "./server.js";

export default (extension, options) => async (app, next) => {
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/markdown/src/private/name.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default "@primate/markdown";
3 changes: 3 additions & 0 deletions packages/markdown/src/private/serve/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import serve from "@primate/frontend/core/serve";

export default serve();
10 changes: 10 additions & 0 deletions packages/markdown/src/public/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import build from "#build";
import default_extension from "#extension";
import name from "#name";
import serve from "#serve";

export default ({ extension = default_extension } = {}) => ({
name,
build: build(extension),
serve: serve(extension),
});
8 changes: 8 additions & 0 deletions packages/markdown/src/public/runtime.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import default_extension from "#extension";
import name from "#name";
import serve from "#serve";

export default ({ extension = default_extension } = {}) => ({
name,
serve: serve(extension),
});
3 changes: 3 additions & 0 deletions packages/markdown/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.base.json"
}

0 comments on commit d244359

Please sign in to comment.