Skip to content

Commit

Permalink
(v2) UI Astro
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Feb 18, 2023
1 parent a6421e3 commit a5cfd9a
Show file tree
Hide file tree
Showing 19 changed files with 17,621 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ node_modules
_ide_helper.php
./ui/.astro
.parcel-cache

.vscode
25 changes: 25 additions & 0 deletions ui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
39 changes: 39 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Notes

### Local UI Development


```
npm install
npm run dev
```

#### Step 1

**Optional** Enable CORS on Laravel to allow localhost:3000
**Recommended** Open Chrome with `--disable-web-security` flag

On Mac to open chrome command:

```
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
```



#### Step 2

**Open in Browser** http://localhost:3000?api=http://localhost:8000/request-docs/api


## Deployment notes

Handled by Github Actions or manually by @kevincobain2000

```
npm run export
```

Exports SSG production site to `../resources/dist/`, severed by Laravel


12 changes: 12 additions & 0 deletions ui/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'astro/config';
import compress from "astro-compress";
import react from '@astrojs/react';

export default defineConfig({
integrations: [
compress(),
react()
],
outDir: '../resources/dist',
base: '/request-docs',
});
Loading

0 comments on commit a5cfd9a

Please sign in to comment.