Skip to content

Commit

Permalink
feat: react remix build pipeline (#3)
Browse files Browse the repository at this point in the history
* chore: hello world

* remix hello world

* remove demo files

* move index file

* feat: react remix spa mode

* hide root
  • Loading branch information
GabenGar committed Aug 29, 2024
1 parent cc2a534 commit 62b97b5
Show file tree
Hide file tree
Showing 63 changed files with 9,187 additions and 71 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
dist
# output folder
/dist

/.cache
.env

node_modules

# VSCode workspace file
*.code-workspace
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
16 changes: 16 additions & 0 deletions .vscode/workspace.code-workspace.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.exclude": {
"**/.git": true,
"**/node_modules": true
}
},
"extensions": {
"recommendations": ["biomejs.biome"]
}
}
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,39 @@
# Trimps.github.io
# gabengar.github.io/trimps-x

## Development

You can develop your SPA app just like you would a normal Remix app, via:

```sh
npm run dev
```

## Deployment

When you are ready to build a production version of your app, `npm run build` will generate your assets and an `index.html` for the SPA.

```sh
npm run build
```

### Preview

You can preview the build locally with [vite preview](https://vitejs.dev/guide/cli#vite-preview) to serve all routes via the single `index.html` file:

```sh
npm run preview
```

> [!IMPORTANT]
>
> `vite preview` is not designed for use as a production server
### Deployment

You can then serve your app from any HTTP server of your choosing. The server should be configured to serve multiple paths from a single root `/index.html` file (commonly called "SPA fallback"). Other steps may be required if the server doesn't directly support this functionality.

For a simple example, you could use [sirv-cli](https://www.npmjs.com/package/sirv-cli):

```shellscript
npx sirv-cli build/client/ --single
```
5 changes: 4 additions & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true
"recommended": true,
"complexity": {
"noForEach": "off"
}
}
},
"formatter": {
Expand Down
Loading

0 comments on commit 62b97b5

Please sign in to comment.