Skip to content

Commit 80c9e04

Browse files
committed
checking deploy
0 parents  commit 80c9e04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1058
-0
lines changed

.github/workflows/deploy.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches: main
5+
pull_request:
6+
branches: main
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
id-token: write # Needed for auth with Deno Deploy
15+
contents: read # Needed to clone the repository
16+
17+
steps:
18+
- name: Clone repository
19+
uses: actions/checkout@v3
20+
21+
- name: Install Deno
22+
uses: denoland/setup-deno@v1
23+
with:
24+
deno-version: v1.x
25+
26+
- name: Build step
27+
run: "deno task mono build"
28+

.vscode/extensions.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"denoland.vscode-deno",
4+
"bradlc.vscode-tailwindcss"
5+
]
6+
}

.vscode/settings.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"deno.enable": true,
3+
"deno.lint": true,
4+
"deno.unstable": true,
5+
"editor.defaultFormatter": "denoland.vscode-deno",
6+
"[typescriptreact]": {
7+
"editor.defaultFormatter": "denoland.vscode-deno"
8+
},
9+
"[typescript]": {
10+
"editor.defaultFormatter": "denoland.vscode-deno"
11+
},
12+
"[javascriptreact]": {
13+
"editor.defaultFormatter": "denoland.vscode-deno"
14+
},
15+
"[javascript]": {
16+
"editor.defaultFormatter": "denoland.vscode-deno"
17+
},
18+
"css.customData": [
19+
".vscode/tailwind.json"
20+
]
21+
}

.vscode/tailwind.json

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
7+
"references": [
8+
{
9+
"name": "Tailwind Documentation",
10+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
11+
}
12+
]
13+
},
14+
{
15+
"name": "@apply",
16+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
17+
"references": [
18+
{
19+
"name": "Tailwind Documentation",
20+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
21+
}
22+
]
23+
},
24+
{
25+
"name": "@responsive",
26+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
27+
"references": [
28+
{
29+
"name": "Tailwind Documentation",
30+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
31+
}
32+
]
33+
},
34+
{
35+
"name": "@screen",
36+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
37+
"references": [
38+
{
39+
"name": "Tailwind Documentation",
40+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
41+
}
42+
]
43+
},
44+
{
45+
"name": "@variants",
46+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
47+
"references": [
48+
{
49+
"name": "Tailwind Documentation",
50+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
51+
}
52+
]
53+
}
54+
]
55+
}

README.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
![top](./public/top.png)
2+
3+
# Denomono 🦕
4+
5+
Denomono is the code you get when you run
6+
```bash
7+
deno run -A jsr:@jurassicjs/create-monodeno
8+
```
9+
10+
## What's the purpose of Denomono?
11+
I like Deno. I like monorepos. I like to have a monorepo with Deno. So I created Denomono.
12+
13+
### Are there better solutions out there?
14+
Probably, but I couldn't find it. If you know of something, please create an issue and let me know. I'd love to see what you've got.
15+
16+
## What's inside Denomono?
17+
Out of the box, Denomono comes with the following features:
18+
19+
- [x] Monorepo with Deno and two fresh.js projects
20+
- [x] A way to run all the projects at once (see: how to run locally)
21+
- [x] An example deploy.yml that deploys the monorepo apps to deno.deploy
22+
- [x] TailwindCSS set up for the mono repo
23+
- [x] A UI library for the mono repo so you can share components between the two projects
24+
25+
26+
## How to run locally
27+
run
28+
```bash
29+
deno task mono start
30+
```
31+
32+
In fact, any task you run with mono will run the task in all the projects. So you can run.
33+
34+
For example, let's build the projects
35+
```bash
36+
deno task mono build
37+
```
38+
39+
Demo Sites:
40+
41+
https://jurassic-mono-web.deno.dev/
42+
![web](./public/web.png)
43+
44+
https://jurassic-mono-docs.deno.dev/
45+
![docs](./public/docs.png)
46+
47+
48+
Enjoy Denomono! Happy coding! 🦕

apps/docs/.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# dotenv environment variable files
2+
.env
3+
.env.development.local
4+
.env.test.local
5+
.env.production.local
6+
.env.local
7+
8+
# Fresh build directory
9+
_fresh/
10+
# npm dependencies
11+
node_modules/

apps/docs/.vscode/extensions.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"denoland.vscode-deno",
4+
"bradlc.vscode-tailwindcss"
5+
]
6+
}

apps/docs/.vscode/settings.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"deno.enable": true,
3+
"deno.lint": true,
4+
"editor.defaultFormatter": "denoland.vscode-deno",
5+
"[typescriptreact]": {
6+
"editor.defaultFormatter": "denoland.vscode-deno"
7+
},
8+
"[typescript]": {
9+
"editor.defaultFormatter": "denoland.vscode-deno"
10+
},
11+
"[javascriptreact]": {
12+
"editor.defaultFormatter": "denoland.vscode-deno"
13+
},
14+
"[javascript]": {
15+
"editor.defaultFormatter": "denoland.vscode-deno"
16+
},
17+
"css.customData": [
18+
".vscode/tailwind.json"
19+
]
20+
}

apps/docs/.vscode/tailwind.json

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
7+
"references": [
8+
{
9+
"name": "Tailwind Documentation",
10+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
11+
}
12+
]
13+
},
14+
{
15+
"name": "@apply",
16+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
17+
"references": [
18+
{
19+
"name": "Tailwind Documentation",
20+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
21+
}
22+
]
23+
},
24+
{
25+
"name": "@responsive",
26+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
27+
"references": [
28+
{
29+
"name": "Tailwind Documentation",
30+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
31+
}
32+
]
33+
},
34+
{
35+
"name": "@screen",
36+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
37+
"references": [
38+
{
39+
"name": "Tailwind Documentation",
40+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
41+
}
42+
]
43+
},
44+
{
45+
"name": "@variants",
46+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
47+
"references": [
48+
{
49+
"name": "Tailwind Documentation",
50+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
51+
}
52+
]
53+
}
54+
]
55+
}

apps/docs/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Fresh project
2+
3+
Your new Fresh project is ready to go. You can follow the Fresh "Getting
4+
Started" guide here: https://fresh.deno.dev/docs/getting-started
5+
6+
### Usage
7+
8+
Make sure to install Deno: https://deno.land/manual/getting_started/installation
9+
10+
Then start the project:
11+
12+
```
13+
deno task start
14+
```
15+
16+
This will watch the project directory and restart as necessary.

apps/docs/components/Button.tsx

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { JSX } from "preact";
2+
import { IS_BROWSER } from "$fresh/runtime.ts";
3+
4+
export function Button(props: JSX.HTMLAttributes<HTMLButtonElement>) {
5+
return (
6+
<button
7+
{...props}
8+
disabled={!IS_BROWSER || props.disabled}
9+
class="px-2 py-1 border-gray-500 border-2 rounded bg-white hover:bg-gray-200 transition-colors"
10+
/>
11+
);
12+
}

apps/docs/deno.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@jurassicjs/docs",
3+
"version": "0.0.1",
4+
"lock": false,
5+
"tasks": {
6+
"greet": "deno run --allow-read --allow-env --allow-net tasks/greet.ts",
7+
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
8+
"cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -",
9+
"manifest": "deno task cli manifest $(pwd)",
10+
"start": "deno run -A --watch=static/,routes/ dev.ts",
11+
"build": "deno run -A dev.ts build",
12+
"preview": "deno run -A main.ts",
13+
"update": "deno run -A -r https://fresh.deno.dev/update ."
14+
},
15+
"lint": {
16+
"rules": {
17+
"tags": [
18+
"fresh",
19+
"recommended"
20+
]
21+
}
22+
},
23+
"exclude": [
24+
"**/_fresh/*"
25+
],
26+
"imports": {
27+
"@jurassicjs/roar": "../../packages/roar/mod.ts",
28+
"@jurassicjs/ui": "../../packages/ui/mod.ts",
29+
"$fresh/": "https://deno.land/x/[email protected]/",
30+
"preact": "https://esm.sh/[email protected]",
31+
"preact/": "https://esm.sh/[email protected]/",
32+
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
33+
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]",
34+
"tailwindcss": "npm:[email protected]",
35+
"tailwindcss/": "npm:/[email protected]/",
36+
"tailwindcss/plugin": "npm:/[email protected]/plugin.js",
37+
"$std/": "https://deno.land/[email protected]/"
38+
},
39+
"compilerOptions": {
40+
"jsx": "react-jsx",
41+
"jsxImportSource": "preact"
42+
},
43+
"nodeModulesDir": true,
44+
"workspace": "."
45+
}

apps/docs/dev.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env -S deno run -A --watch=static/,routes/
2+
3+
import dev from "$fresh/dev.ts";
4+
import config from "./fresh.config.ts";
5+
6+
import "$std/dotenv/load.ts";
7+
8+
await dev(import.meta.url, "./main.ts", config);

apps/docs/fresh.config.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { defineConfig } from "$fresh/server.ts";
2+
import tailwind from "$fresh/plugins/tailwind.ts";
3+
4+
export default defineConfig({
5+
plugins: [tailwind()],
6+
server: {
7+
port: 8888,
8+
},
9+
});

apps/docs/fresh.gen.ts

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// DO NOT EDIT. This file is generated by Fresh.
2+
// This file SHOULD be checked into source version control.
3+
// This file is automatically updated during development when running `dev.ts`.
4+
5+
import * as $_404 from "./routes/_404.tsx";
6+
import * as $_app from "./routes/_app.tsx";
7+
import * as $api_joke from "./routes/api/joke.ts";
8+
import * as $greet_name_ from "./routes/greet/[name].tsx";
9+
import * as $index from "./routes/index.tsx";
10+
import * as $Counter from "./islands/Counter.tsx";
11+
import { type Manifest } from "$fresh/server.ts";
12+
13+
const manifest = {
14+
routes: {
15+
"./routes/_404.tsx": $_404,
16+
"./routes/_app.tsx": $_app,
17+
"./routes/api/joke.ts": $api_joke,
18+
"./routes/greet/[name].tsx": $greet_name_,
19+
"./routes/index.tsx": $index,
20+
},
21+
islands: {
22+
"./islands/Counter.tsx": $Counter,
23+
},
24+
baseUrl: import.meta.url,
25+
} satisfies Manifest;
26+
27+
export default manifest;

apps/docs/islands/Counter.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { Signal } from "@preact/signals";
2+
import { Button } from "@jurassicjs/ui";
3+
4+
interface CounterProps {
5+
count: Signal<number>;
6+
}
7+
8+
export default function Counter(props: CounterProps) {
9+
return (
10+
<div class="flex gap-8 py-6">
11+
<Button onClick={() => props.count.value -= 1}>-1</Button>
12+
<p class="text-3xl tabular-nums">{props.count}</p>
13+
<Button onClick={() => props.count.value += 1}>+1</Button>
14+
</div>
15+
);
16+
}

0 commit comments

Comments
 (0)