-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(format): format all files using Prettier
- Loading branch information
1 parent
e1e16f8
commit be60ba4
Showing
24 changed files
with
428 additions
and
159 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
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 |
---|---|---|
|
@@ -9,3 +9,6 @@ public/build | |
|
||
# Next.js | ||
.next/ | ||
|
||
# Senarai Data | ||
app/data/*.json |
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,5 +1,3 @@ | ||
{ | ||
"recommendations": [ | ||
"denoland.vscode-deno" | ||
] | ||
} | ||
"recommendations": ["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 |
---|---|---|
|
@@ -12,20 +12,29 @@ npx create-remix@latest --template deno | |
|
||
## Managing dependencies | ||
|
||
Read about [how we recommend to manage dependencies for Remix projects using Deno](https://github.com/remix-run/remix/blob/main/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md). | ||
Read about | ||
[how we recommend to manage dependencies for Remix projects using Deno](https://github.com/remix-run/remix/blob/main/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md). | ||
|
||
- ✅ You should use `npm` to install NPM packages | ||
|
||
```sh | ||
npm install react | ||
``` | ||
|
||
```ts | ||
import { useState } from 'react' | ||
``` | ||
- ✅ You may use inlined URL imports or [deps.ts](https://deno.land/manual/examples/manage_dependencies#managing-dependencies) for Deno modules. | ||
|
||
- ✅ You may use inlined URL imports or | ||
[deps.ts](https://deno.land/manual/examples/manage_dependencies#managing-dependencies) | ||
for Deno modules. | ||
|
||
```ts | ||
import { copy } from 'https://deno.land/[email protected]/streams/conversion.ts' | ||
``` | ||
- ❌ Do not use [import maps](https://deno.land/manual/linking_to_external_code/import_maps). | ||
|
||
- ❌ Do not use | ||
[import maps](https://deno.land/manual/linking_to_external_code/import_maps). | ||
|
||
## Development | ||
|
||
|
@@ -39,11 +48,14 @@ This starts your app in development mode, rebuilding assets on file changes. | |
|
||
### Type hints | ||
|
||
This template provides type hinting to VS Code via a [dedicated import map](./.vscode/resolve_npm_imports.json). | ||
This template provides type hinting to VS Code via a | ||
[dedicated import map](./.vscode/resolve_npm_imports.json). | ||
|
||
To get types in another editor, use an extension for Deno that supports import maps and point your editor to `./.vscode/resolve_npm_imports.json`. | ||
To get types in another editor, use an extension for Deno that supports import | ||
maps and point your editor to `./.vscode/resolve_npm_imports.json`. | ||
|
||
For more, see [our decision doc for interop between Deno and NPM](https://github.com/remix-run/remix/blob/main/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md#vs-code-type-hints). | ||
For more, see | ||
[our decision doc for interop between Deno and NPM](https://github.com/remix-run/remix/blob/main/decisions/0001-use-npm-to-manage-npm-dependencies-for-deno-projects.md#vs-code-type-hints). | ||
|
||
## Production | ||
|
||
|
@@ -66,40 +78,47 @@ Building the Deno app (`npm run build`) results in two outputs: | |
- `build/` (server bundle) | ||
- `public/build/` (browser bundle) | ||
|
||
You can deploy these bundles to any host that runs Deno, but here we'll focus on deploying to [Deno Deploy](https://deno.com/deploy). | ||
You can deploy these bundles to any host that runs Deno, but here we'll focus on | ||
deploying to [Deno Deploy](https://deno.com/deploy). | ||
|
||
## Setting up Deno Deploy | ||
|
||
1. [Sign up](https://dash.deno.com/signin) for Deno Deploy. | ||
|
||
2. [Create a new Deno Deploy project](https://dash.deno.com/new) for this app. | ||
|
||
3. Replace `<your deno deploy project>` in the `deploy` script in `package.json` with your Deno Deploy project name: | ||
3. Replace `<your deno deploy project>` in the `deploy` script in `package.json` | ||
with your Deno Deploy project name: | ||
|
||
```json | ||
{ | ||
"scripts": { | ||
"deploy": "deployctl deploy --project=<your deno deploy project> --include=.cache,build,public ./build/index.js" | ||
} | ||
} | ||
``` | ||
```json | ||
{ | ||
"scripts": { | ||
"deploy": "deployctl deploy --project=<your deno deploy project> --include=.cache,build,public ./build/index.js" | ||
} | ||
} | ||
``` | ||
|
||
4. [Create a personal access token](https://dash.deno.com/account) for the Deno Deploy API and export it as `DENO_DEPLOY_TOKEN`: | ||
4. [Create a personal access token](https://dash.deno.com/account) for the Deno | ||
Deploy API and export it as `DENO_DEPLOY_TOKEN`: | ||
|
||
```sh | ||
export DENO_DEPLOY_TOKEN=<your Deno Deploy API token> | ||
``` | ||
```sh | ||
export DENO_DEPLOY_TOKEN=<your Deno Deploy API token> | ||
``` | ||
|
||
You may want to add this to your `rc` file (e.g. `.bashrc` or `.zshrc`) to make it available for new terminal sessions, but make sure you don't commit this token into `git`. | ||
If you want to use this token in GitHub Actions, set it as a GitHub secret. | ||
You may want to add this to your `rc` file (e.g. `.bashrc` or `.zshrc`) to | ||
make it available for new terminal sessions, but make sure you don't commit | ||
this token into `git`. If you want to use this token in GitHub Actions, set | ||
it as a GitHub secret. | ||
|
||
5. Install the Deno Deploy CLI, [`deployctl`](https://github.com/denoland/deployctl): | ||
5. Install the Deno Deploy CLI, | ||
[`deployctl`](https://github.com/denoland/deployctl): | ||
|
||
```sh | ||
deno install --allow-read --allow-write --allow-env --allow-net --allow-run --no-check -r -f https://deno.land/x/deploy/deployctl.ts | ||
``` | ||
```sh | ||
deno install --allow-read --allow-write --allow-env --allow-net --allow-run --no-check -r -f https://deno.land/x/deploy/deployctl.ts | ||
``` | ||
|
||
6. If you have previously installed the Deno Deploy CLI, you should update it to the latest version: | ||
6. If you have previously installed the Deno Deploy CLI, you should update it to | ||
the latest version: | ||
|
||
```sh | ||
deployctl upgrade | ||
|
@@ -118,7 +137,10 @@ npm run deploy | |
#### How to use FontAwesome in the project | ||
|
||
1. Search [FontAwesome Icons](https://fontawesome.com/icons) | ||
2. Download the SVG code (if it's a Pro icon, please ask @zainfathoni to download it for you) | ||
3. Paste the SVG code into the `SVG INPUT` panel of [SVGR with these params](https://react-svgr.com/playground/?svgProps=role%3Dimg%2Cfill%3DcurrentColor&typescript=true) | ||
2. Download the SVG code (if it's a Pro icon, please ask @zainfathoni to | ||
download it for you) | ||
3. Paste the SVG code into the `SVG INPUT` panel of | ||
[SVGR with these params](https://react-svgr.com/playground/?svgProps=role%3Dimg%2Cfill%3DcurrentColor&typescript=true) | ||
4. Copy the resulting `<svg>` tag in the `JSX OUTPUT` panel | ||
5. Paste the `<svg>` tag into the corresponding file under the [icons](/app/icons/) directory | ||
5. Paste the `<svg>` tag into the corresponding file under the | ||
[icons](/app/icons/) directory |
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
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
Oops, something went wrong.