Skip to content

Commit

Permalink
Rely on caniuse for usage stats and release dates
Browse files Browse the repository at this point in the history
  • Loading branch information
nonrational committed Oct 19, 2024
1 parent 50e3f8f commit 09fe5a0
Show file tree
Hide file tree
Showing 23 changed files with 625 additions and 628 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on: push

jobs:
test:
name: test
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Install Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- run: deno fmt --check
- run: deno lint
- run: deno test
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Deploy
name: DMZ Deploy

on:
push:
branches: main
pull_request:
branches: main

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: github.repository_owner == 'run-dmz'

permissions:
id-token: write # Needed for auth with Deno Deploy
Expand All @@ -24,11 +24,11 @@ jobs:
deno-version: v2.x

- name: Build step
run: "deno task build"
run: 'deno task build'

- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "user-agent-info"
entrypoint: "main.ts"
root: "."
project: 'user-agent-info'
entrypoint: 'main.ts'
root: '.'
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
deno 2.0.1
deno 2.0.2
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Fresh project

Your new Fresh project is ready to go. You can follow the Fresh "Getting
Started" guide here: https://fresh.deno.dev/docs/getting-started
Your new Fresh project is ready to go. You can follow the Fresh "Getting Started" guide here: https://fresh.deno.dev/docs/getting-started

### Usage

Expand Down
8 changes: 4 additions & 4 deletions components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JSX } from "preact";
import { IS_BROWSER } from "$fresh/runtime.ts";
import { JSX } from 'preact'
import { IS_BROWSER } from '$fresh/runtime.ts'

export function Button(props: JSX.HTMLAttributes<HTMLButtonElement>) {
return (
<button
{...props}
disabled={!IS_BROWSER || props.disabled}
class="px-2 py-1 border-gray-500 border-2 rounded bg-white hover:bg-gray-200 transition-colors"
class='px-2 py-1 border-gray-500 border-2 rounded bg-white hover:bg-gray-200 transition-colors'
/>
);
)
}
19 changes: 13 additions & 6 deletions deno.json → deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
"update": "deno run -A -r https://fresh.deno.dev/update .",
// custom tasks
"format-all": "deno fmt ."
},
"fmt": {
"semiColons": false,
"lineWidth": 130
"lineWidth": 140,
"singleQuote": true
},
"lint": {
"rules": {
Expand All @@ -26,14 +29,18 @@
],
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.7.3/",
"preact": "https://esm.sh/preact@10.22.0",
"preact/": "https://esm.sh/preact@10.22.0/",
"$std/": "https://deno.land/std@0.216.0/",
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.2",
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1",
"@std/assert": "jsr:@std/assert@^1.0.6",
"@std/csv": "jsr:@std/csv@^1.0.3",
"@std/semver": "jsr:@std/semver@^1.0.3",
"caniuse-db": "npm:caniuse-db@^1.0.30001669",
"preact": "https://esm.sh/preact@10.22.0",
"preact/": "https://esm.sh/preact@10.22.0/",
"tailwindcss": "npm:tailwindcss@3.4.1",
"tailwindcss/": "npm:/tailwindcss@3.4.1/",
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js",
"$std/": "https://deno.land/std@0.216.0/"
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js"
},
"compilerOptions": {
"jsx": "react-jsx",
Expand Down
8 changes: 4 additions & 4 deletions dev.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/

import dev from "$fresh/dev.ts";
import config from "./fresh.config.ts";
import dev from '$fresh/dev.ts'
import config from './fresh.config.ts'

import "$std/dotenv/load.ts";
import '$std/dotenv/load.ts'

await dev(import.meta.url, "./main.ts", config);
await dev(import.meta.url, './main.ts', config)
Loading

0 comments on commit 09fe5a0

Please sign in to comment.