-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: convert sources to use React and Next.js (#1)
Reworked the project into a Next.js project - Files and styles are ported as they were previously created - Firebase support ported, needs to be tested --------- Co-authored-by: Riccardo Montagnin <[email protected]>
- Loading branch information
Showing
27 changed files
with
4,777 additions
and
510 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { join } = require('path') | ||
const { https } = require('firebase-functions') | ||
const next = require('next') | ||
|
||
const nextjsDistDir = join('src', require('./next.config.js').distDir) | ||
console.log(nextjsDistDir); | ||
|
||
const nextjsServer = next({ | ||
dev: false, | ||
conf: { | ||
distDir: nextjsDistDir, | ||
}, | ||
}) | ||
const nextjsHandle = nextjsServer.getRequestHandler() | ||
|
||
exports.nextjsFunc = https.onRequest((req, res) => { | ||
return nextjsServer.prepare().then(() => nextjsHandle(req, res)) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
distDir: ".next", | ||
reactStrictMode: true, | ||
rewrites: async () => [ | ||
{ | ||
source: "/public/creator.html", | ||
destination: "/api/creator.js", | ||
}, | ||
], | ||
}; | ||
|
||
module.exports = nextConfig; |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "bondscape-website", | ||
"version": "0.1.0", | ||
"private": true, | ||
"main": "firebaseFunctions.js", | ||
"type": "commonjs", | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"scripts": { | ||
"dev": "next", | ||
"build": "next build", | ||
"start": "next start", | ||
"serve": "yarn build && firebase emulators:start --only functions,hosting", | ||
"shell": "yarn build && firebase functions:shell", | ||
"deploy": "firebase deploy --only functions,hosting", | ||
"logs": "firebase functions:log" | ||
}, | ||
"dependencies": { | ||
"@types/node": "20.6.1", | ||
"@types/react": "18.2.21", | ||
"@types/react-dom": "18.2.7", | ||
"autoprefixer": "10.4.15", | ||
"cross-env": "^7.0.3", | ||
"eslint": "8.49.0", | ||
"eslint-config-next": "13.4.19", | ||
"firebase-admin": "^11.10.1", | ||
"firebase-functions": "^4.4.1", | ||
"next": "13.4.19", | ||
"next-seo": "^6.1.0", | ||
"path": "^0.12.7", | ||
"postcss": "8.4.29", | ||
"prettier": "^3.0.3", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"react-responsive": "^9.0.2", | ||
"tailwindcss": "3.3.3", | ||
"typescript": "5.2.2", | ||
"use-places-autocomplete": "^4.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/google.maps": "^3.54.1" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Oops, something went wrong.