Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed May 17, 2022
1 parent aa39050 commit 97ed0e1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .vscode/deno_resolve_npm_imports.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"mime": "https://esm.sh/mime@3.0.0",
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@1.4.3"
}
}
}
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"deno.enablePaths": [
"./packages/remix-deno/",
],
"deno.enablePaths": ["./packages/remix-deno/"],
"deno.importMap": "./.vscode/deno_resolve_npm_imports.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Deno has three ways to manage dependencies:
Additionally, NPM packages can be accessed as Deno modules via [Deno-friendly CDNs](https://deno.land/manual/node/cdns#deno-friendly-cdns) like https://esm.sh .

Remix has some requirements around dependencies:

- Remix treeshakes dependencies that are free of side-effects.
- Remix sets the environment (dev/prod/test) across all code, including dependencies, at runtime via the `NODE_ENV` environment variable.
- Remix depends on some NPM packages that should be specified as peer dependencies (notably, `react` and `react-dom`).
Expand Down Expand Up @@ -86,6 +87,7 @@ Remix will not yet support import maps.
Users may configure an import map for the [Deno extension for VS Code](denoland.vscode-deno) to enable type hints for NPM-managed dependencies within their Deno editor:

`.vscode/resolve_npm_imports_in_deno.json`

```json
{
"// This import map is used solely for the denoland.vscode-deno extension.": "",
Expand All @@ -102,9 +104,10 @@ Users may configure an import map for the [Deno extension for VS Code](denoland.
```

`.vscode/settings.json`

```json
{
"deno.enable": true,
"deno.importMap": "./.vscode/resolve_npm_imports_in_deno.json"
}
```
```
6 changes: 3 additions & 3 deletions integration/helpers/deno-template/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export default function handleRequest(
request: Request,
responseStatusCode: number,
responseHeaders: Headers,
remixContext: EntryContext,
remixContext: EntryContext
) {
const markup = renderToString(
<RemixServer context={remixContext} url={request.url} />,
let markup = renderToString(
<RemixServer context={remixContext} url={request.url} />
);

responseHeaders.set("Content-Type", "text/html");
Expand Down
12 changes: 6 additions & 6 deletions templates/deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
"lint": "deno lint --ignore=node_modules",
"format": "deno fmt --ignore=node_modules"
},
"dependencies": {
"@remix-run/deno": "*",
"@remix-run/react": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@remix-run/dev": "*",
"cross-env": "^7.0.3",
"npm-run-all": "^4.1.5"
},
"engines": {
"node": ">=14"
},
"dependencies": {
"@remix-run/deno": "*",
"@remix-run/react": "*",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
}

0 comments on commit 97ed0e1

Please sign in to comment.