-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/add_showcase_echo-echo
- Loading branch information
Showing
972 changed files
with
32,320 additions
and
5,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Use Unix line endings in all text files. | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,8 @@ name: ci | |
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: [www/**] | ||
pull_request: | ||
branches: [main] | ||
paths-ignore: [www/**] | ||
|
||
jobs: | ||
test: | ||
|
@@ -16,80 +14,50 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
deno: ["v1.x", "canary"] | ||
deno: ["canary", "v1.x"] | ||
os: [macOS-latest, windows-latest, ubuntu-latest] | ||
include: | ||
- os: ubuntu-latest | ||
cache_path: ~/.cache/deno/ | ||
- os: macos-latest | ||
cache_path: ~/Library/Caches/deno/ | ||
- os: windows-latest | ||
cache_path: ~\AppData\Local\deno\ | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ matrix.deno }} | ||
|
||
- name: Verify formatting | ||
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x' | ||
run: deno fmt --check | ||
|
||
- name: Run linter | ||
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'canary' | ||
run: deno lint | ||
|
||
- name: Cache dependencies | ||
- name: Spell-check | ||
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x' | ||
run: deno cache --no-check --import-map=./www/import_map.json src/dev/deps.ts src/server/deps.ts www/main.ts | ||
|
||
- name: Cache Chrome (Linux) | ||
if: startsWith(matrix.os, 'ubuntu') | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/deno/deno_puppeteer | ||
key: chrome-1022525-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }} | ||
restore-keys: chrome-1022525-${{ runner.os }}- | ||
|
||
- name: Cache Chrome (macOS) | ||
if: startsWith(matrix.os, 'mac') | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/Library/Caches/deno/deno_puppeteer | ||
key: chrome-1022525-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }} | ||
restore-keys: chrome-1022525-${{ runner.os }}- | ||
uses: crate-ci/typos@master | ||
|
||
- name: Cache Chrome (Windows) | ||
if: startsWith(matrix.os, 'win') | ||
uses: actions/cache@v3 | ||
- name: Cache dependencies and Chrome | ||
uses: actions/cache@v4 | ||
with: | ||
path: "C:\\Users\\RUNNER~1\\AppData\\Local\\deno\\deno_puppeteer" | ||
key: chrome-1022525-${{ runner.os }}-${{ hashFiles('tests/deps.ts') }} | ||
restore-keys: chrome-1022525-${{ runner.os }}- | ||
path: | | ||
${{ matrix.cache_path }}deps | ||
${{ matrix.cache_path }}deno_puppeteer | ||
key: ${{ runner.os }}-${{ hashFiles('**/*deps.ts', 'tests/fixture_twind_hydrate/twind.config.ts') }} | ||
|
||
- name: Install Chromium (Unix) | ||
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'mac') | ||
run: PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/[email protected]/install.ts | ||
- name: Install Chromium | ||
run: deno run -A --unstable https://deno.land/x/[email protected]/install.ts | ||
env: | ||
PUPPETEER_PRODUCT: chrome | ||
|
||
- name: Install Chromium (Windows) | ||
if: startsWith(matrix.os, 'windows') | ||
run: set "PUPPETEER_PRODUCT=chrome" && deno run -A --unstable https://deno.land/x/[email protected]/install.ts | ||
- name: Type check project | ||
run: deno task check:types | ||
|
||
- name: Run tests | ||
run: deno test -A | ||
|
||
- name: Type check init script | ||
run: deno check --remote init.ts | ||
|
||
- name: Type check website | ||
run: deno check main.ts dev.ts | ||
working-directory: www/ | ||
|
||
- name: Type check examples/counter | ||
run: deno check --remote main.ts dev.ts | ||
working-directory: examples/counter | ||
|
||
- name: Type check tests/fixture | ||
run: deno check main.ts dev.ts | ||
working-directory: tests/fixture/ | ||
|
||
- name: Type check tests/fixture_error | ||
run: deno check main.ts dev.ts | ||
working-directory: tests/fixture_error/ | ||
run: deno task test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: main | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write # Needed for auth with Deno Deploy | ||
contents: read # Needed to clone the repository | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Build step | ||
working-directory: ./www | ||
run: "deno task build" # 📝 Update the build command(s) if necessary | ||
|
||
- name: Upload to Deno Deploy | ||
uses: denoland/deployctl@v1 | ||
with: | ||
project: "fresh" # 📝 Update the deploy project name if necessary | ||
entrypoint: "./www/main.ts" # 📝 Update the entrypoint if necessary | ||
root: "." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ jobs: | |
URL: ${{ github.event.deployment_status.environment_url }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Install Lighthouse CI | ||
run: npm install -g @lhci/[email protected] | ||
|
||
- name: Run Lighthouse | ||
run: lhci autorun --collect.url="$URL" --collect.url="$URL/docs/introduction" --upload.target="temporary-public-storage" | ||
- name: Audit URLs using Lighthouse | ||
uses: treosh/lighthouse-ci-action@v10 | ||
env: | ||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | ||
with: | ||
temporaryPublicStorage: true | ||
urls: | | ||
$URL | ||
$URL/docs/introduction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: post_publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
update-dl-version: | ||
name: update dl.deno.land version | ||
runs-on: ubuntu-22.04 | ||
if: github.repository == 'denoland/fresh' | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
project_id: denoland | ||
credentials_json: ${{ secrets.GCP_SA_KEY }} | ||
export_environment_variables: true | ||
create_credentials_file: true | ||
|
||
- name: Setup gcloud | ||
uses: google-github-actions/setup-gcloud@v2 | ||
with: | ||
project_id: denoland | ||
|
||
- name: Upload version file to dl.deno.land | ||
run: | | ||
cat versions.json | jq -r ".[0]" > release-latest.txt | ||
gsutil -h "Cache-Control: no-cache" cp release-latest.txt gs://dl.deno.land/fresh/release-latest.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_fresh/ | ||
tmp/ | ||
vendor/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"denoland.vscode-deno", | ||
"sastan.twind-intellisense" | ||
"denoland.vscode-deno" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,19 @@ | |
"$fresh/": "../", | ||
"twind": "https://esm.sh/[email protected]", | ||
"twind/": "https://esm.sh/[email protected]/", | ||
"preact": "https://esm.sh/[email protected]", | ||
"preact/": "https://esm.sh/[email protected]/", | ||
"preact-render-to-string": "https://esm.sh/*[email protected]", | ||
"@preact/signals": "https://esm.sh/*@preact/[email protected]", | ||
"@preact/signals-core": "https://esm.sh/@preact/[email protected]", | ||
"$std/": "https://deno.land/[email protected]/" | ||
"preact": "https://esm.sh/[email protected]", | ||
"preact/": "https://esm.sh/[email protected]/", | ||
"@preact/signals": "https://esm.sh/*@preact/[email protected]", | ||
"@preact/signals-core": "https://esm.sh/@preact/[email protected]", | ||
"@preact/[email protected]": "https://esm.sh/@preact/[email protected]", | ||
"@preact/[email protected]": "https://esm.sh/@preact/[email protected]", | ||
"$std/": "https://deno.land/[email protected]/", | ||
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts", | ||
"$marked-mangle": "https://esm.sh/[email protected]", | ||
"$fresh-testing-library": "https://deno.land/x/[email protected]/mod.ts", | ||
"$fresh-testing-library/": "https://deno.land/x/[email protected]/", | ||
"tailwindcss": "npm:[email protected]", | ||
"tailwindcss/": "npm:/[email protected]/", | ||
"tailwindcss/plugin": "npm:/[email protected]/plugin.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"version": 1.1, | ||
"atDirectives": [ | ||
{ | ||
"name": "@tailwind", | ||
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@apply", | ||
"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.", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#apply" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@responsive", | ||
"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", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@screen", | ||
"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", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#screen" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "@variants", | ||
"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", | ||
"references": [ | ||
{ | ||
"name": "Tailwind Documentation", | ||
"url": "https://tailwindcss.com/docs/functions-and-directives#variants" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.