-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WORK IN PROGRESS - init nextjs UI renewal #103
Conversation
9fda2a8
to
c097aee
Compare
…small fixes for local storage
We started this pull req using Nextjs 13, but it gave us hard time with the export to static as it was still under work in progress by Vercel team. Since much of development was done on Nextjs 13's norm, it was hard to go back to Next 12 to just be able to export. Using Astro.js and react instead. Plus with Astro the exported static has much more manageable assets, which we can serve via Laravel behind middlewares, so that users don't need to do a PS: Will keep this branch as it is, in case we migrate from Astrojs to Nextjs, because Javascript world is the world I can never predict. |
Major changes in #124 Change 1: The reason to choose Ace in #124 instead of monaco editor as this pull req has, is because of the bundle size was over 1MB for monaco editor alone. Therefore, choosing a light weight. |
DONEs
npx create-next-app@latest --ts ui
--turbo
, unable to use, becausebasePath:
is not supported insidenext.config.js
.next.config.js
to/vendor/request-docs/
for UI and/vendor/request-docs/api/sample
for sample API. Dev environment available vianpm run dev
onhttp://localhost:3000/vendor/request-docs/
. Also added sample response insidesample.ts
for development of UI.package.json
tonext export -o ../resources/dist/"
, which is Laravel's resource dircomposer.json
to publish static site of Nextjs to Laravel's vendor public asphp artisan vendor:publish --tag=request-docs-assets --force
. This step is important so that Nextjs's static js is available publicly for Laravel for the base path..github/nextjs.yml
.index.blade
, to render the Nextjs's static site from Laravel'spublic/vendor/request-docs/index.html
. No impact on middleware for LRD, as everything goes through Laravel.LaravelRequestDocsController
to have json response onjson=true
for Laravel. Since blade is not only going to renderNextjs
.TODOs
.github/release.yml
, so that upon merging tomaster
branch,npm run export
cangit
push the generated static site to theresources/dist/
folder to master.Backend
@kevincobain2000 and @kitloong
php artisan lrd:install
that can force publish the--tag=request-docs-assets --force
resources/dist
tovendor/public/request-docs
how to guideFrontend
@truongns
sample.ts
is the first response for LRD information. Add200-response.ts
etc..for development purposes, since LRD returns sql queries and response time as well.Features
Also fixes