Skip to content

Commit 8850dce

Browse files
(v2) UI Astro
1 parent 6449758 commit 8850dce

19 files changed

+17621
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ node_modules
1515
_ide_helper.php
1616
./ui/.astro
1717
.parcel-cache
18-
18+
.vscode

ui/.eslintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:react/recommended",
9+
"plugin:@typescript-eslint/recommended"
10+
],
11+
"overrides": [
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": "latest",
16+
"sourceType": "module"
17+
},
18+
"plugins": [
19+
"react",
20+
"@typescript-eslint"
21+
],
22+
"rules": {
23+
"@typescript-eslint/no-explicit-any": "off"
24+
}
25+
}

ui/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Notes
2+
3+
### Local UI Development
4+
5+
6+
```
7+
npm install
8+
npm run dev
9+
```
10+
11+
#### Step 1
12+
13+
**Optional** Enable CORS on Laravel to allow localhost:3000
14+
**Recommended** Open Chrome with `--disable-web-security` flag
15+
16+
On Mac to open chrome command:
17+
18+
```
19+
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir='/tmp/chrome_dev_test' --ignore-certificate-errors --ignore-urlfetcher-cert-requests --disable-web-security
20+
```
21+
22+
23+
24+
#### Step 2
25+
26+
**Open in Browser** http://localhost:3000?api=http://localhost:8000/request-docs/api
27+
28+
29+
## Deployment notes
30+
31+
Handled by Github Actions or manually by @kevincobain2000
32+
33+
```
34+
npm run export
35+
```
36+
37+
Exports SSG production site to `../resources/dist/`, severed by Laravel
38+
39+

ui/astro.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from 'astro/config';
2+
import compress from "astro-compress";
3+
import react from '@astrojs/react';
4+
5+
export default defineConfig({
6+
integrations: [
7+
compress(),
8+
react()
9+
],
10+
outDir: '../resources/dist',
11+
base: '/request-docs',
12+
});

0 commit comments

Comments
 (0)