Skip to content

Commit

Permalink
major: import Fresh 2.0 code (#2449)
Browse files Browse the repository at this point in the history
🎉
  • Loading branch information
marvinhagemeister authored May 24, 2024
1 parent 9903576 commit 287929e
Show file tree
Hide file tree
Showing 958 changed files with 15,790 additions and 28,283 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,7 @@ jobs:
- name: Spell-check
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x'
uses: crate-ci/typos@master

- name: Cache dependencies and Chrome
uses: actions/cache@v4
with:
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
run: deno run -A --unstable https://deno.land/x/[email protected]/install.ts
env:
PUPPETEER_PRODUCT: chrome


- name: Type check project
run: deno task check:types

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish JSR

on:
push:
branches:
- fresh-2.0-merge

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

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

- name: Publish Fresh
run: deno publish

- name: Publish @fresh/init
working-directory: ./init
run: deno publish

- name: Publish @fresh/plugin-tailwindcss
working-directory: ./plugin-tailwindcss
run: deno publish

- name: Publish @fresh/update
working-directory: ./update
run: deno publish
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ _fresh/
tmp/
vendor/
node_modules/
.docs/
.DS_Store
24 changes: 0 additions & 24 deletions .vscode/import_map.json

This file was deleted.

8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"deno.enable": true,
"deno.lint": true,
"deno.importMap": "./.vscode/import_map.json",
"deno.codeLens.test": true,
"deno.documentPreloadLimit": 2000,
"editor.formatOnSave": true,
Expand All @@ -21,5 +20,10 @@
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"css.customData": [".vscode/tailwind.json"]
"css.customData": [
".vscode/tailwind.json"
],
"[json]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
}
1 change: 1 addition & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extend-exclude = [
"tests/fixture_partials/routes/scroll_restoration/index.tsx",
"www/static/fonts/FixelVariable.woff2",
"www/static/fonts/FixelVariableItalic.woff2",
"tests/lorem_ipsum.txt",
]

[default]
Expand Down
79 changes: 69 additions & 10 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,83 @@
{
"name": "@fresh/core",
"version": "2.0.0-alpha.9",
"exports": {
".": "./src/mod.ts",
"./runtime": "./src/runtime/shared.ts",
"./client": "./src/runtime/client/mod.tsx",
"./client-dev": "./src/runtime/client/dev.ts",
"./dev": "./src/dev/mod.ts"
},
"lock": false,
"tasks": {
"test": "deno test -A --parallel --trace-ops",
"test": "deno test -A --parallel src/ init/ update/ && deno test -A tests/ www/main_test.ts",
"fixture": "deno run -A --watch=static/,routes/ tests/fixture/dev.ts",
"www": "deno task --cwd=www start",
"build-www": "deno task --cwd=www build",
"screenshot": "deno run -A www/utils/screenshot.ts",
"check:types": "deno check **/*.ts && deno check **/*.tsx",
"check:types": "deno check src/**/*.ts src/**/*.tsx tests/**/*.ts tests/**/*.tsx",
"ok": "deno fmt --check && deno lint && deno task check:types && deno task test",
"install-puppeteer": "PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/[email protected]/install.ts && PUPPETEER_PRODUCT=firefox deno run -A --unstable https://deno.land/x/[email protected]/install.ts",
"test:www": "deno test -A tests/www/",
"manifests": "deno run -A genAllManifest.ts"
},
"exclude": [
"**/_fresh/*",
"**/tmp/*"
],
"importMap": "./.vscode/import_map.json",
"exclude": ["**/_fresh/*", "**/tmp/*", "*/tests_OLD/**"],
"publish": {
"include": [
"src/**",
"deno.json",
"README.md",
"LICENSE",
"www/static/fresh-badge.svg",
"www/static/fresh-badge-dark.svg",
"*.todo"
],
"exclude": ["**/*_test.*", "src/__OLD/**", "*.todo"]
},
"imports": {
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts",
"$marked-mangle": "https://esm.sh/[email protected]",
"$std/": "https://deno.land/[email protected]/",
"@astral/astral": "jsr:@astral/astral@^0.4.0",
"@fresh/core": "./src/mod.ts",
"@fresh/core/client": "./src/runtime/client/mod.tsx",
"@fresh/core/client-dev": "./src/runtime/client/dev.ts",
"@fresh/core/dev": "./src/dev/mod.ts",
"@fresh/core/runtime": "./src/runtime/shared.ts",
"@fresh/plugin-tailwind": "./plugin-tailwindcss/src/mod.ts",
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3",
"@preact/signals": "npm:@preact/signals@^1.2.3",
"@std/async": "jsr:@std/async@^0.224.1",
"@std/cli": "jsr:@std/cli@^0.221.0",
"@std/crypto": "jsr:@std/crypto@^0.221.0",
"@std/datetime": "jsr:@std/datetime@^0.224.0",
"@std/encoding": "jsr:@std/encoding@^0.221.0",
"@std/expect": "jsr:@std/expect@^0.224.0",
"@std/fmt": "jsr:@std/fmt@^0.224.0",
"@std/fs": "jsr:@std/fs@^0.221.0",
"@std/html": "jsr:@std/html@^0.224.0",
"@std/jsonc": "jsr:@std/jsonc@^0.221.0",
"@std/media-types": "jsr:@std/media-types@^0.221.0",
"@std/path": "jsr:@std/path@^0.221.0",
"@std/semver": "jsr:@std/semver@^0.223.0",
"@std/streams": "jsr:@std/streams@^0.221.0",
"autoprefixer": "npm:[email protected]",
"cssnano": "npm:[email protected]",
"esbuild": "npm:[email protected]",
"esbuild-wasm": "npm:[email protected]",
"linkedom": "npm:linkedom@^0.16.11",
"postcss": "npm:[email protected]",
"preact": "npm:preact@^10.22.0",
"preact-render-to-string": "npm:preact-render-to-string@^6.4.2",
"tailwindcss": "npm:tailwindcss@^3.4.1",
"tailwindcss/plugin": "npm:/tailwindcss@^3.4.1/plugin.js",
"ts-morph": "npm:ts-morph@^22.0.0",
"twind": "https://esm.sh/[email protected]",
"twind/": "https://esm.sh/[email protected]/"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
"jsx": "precompile",
"jsxImportSource": "preact",
"jsxPrecompileSkipElements": ["a", "img", "source", "body", "html", "head"]
},
"lint": {
"rules": { "exclude": ["no-window"] }
Expand Down
2 changes: 0 additions & 2 deletions dev.ts

This file was deleted.

42 changes: 0 additions & 42 deletions genAllManifest.ts

This file was deleted.

Loading

0 comments on commit 287929e

Please sign in to comment.