-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db11a4d
commit b2a90ef
Showing
21 changed files
with
328 additions
and
7 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
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,34 @@ | ||
{ | ||
"extends": [ | ||
"plugin:@nx/react-typescript", | ||
"next", | ||
"next/core-web-vitals", | ||
"../../.eslintrc.json" | ||
], | ||
"ignorePatterns": ["!**/*", ".next/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@next/next/no-html-link-for-pages": [ | ||
"error", | ||
"apps/hubble-stats/pages" | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
], | ||
"rules": { | ||
"@next/next/no-html-link-for-pages": "off" | ||
}, | ||
"env": { | ||
"jest": true | ||
} | ||
} |
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,4 @@ | ||
{ | ||
"typescript.tsdk": "../../node_modules/typescript/lib", | ||
"typescript.enablePromptUseWorkspaceTsdk": true | ||
} |
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 @@ | ||
export async function GET(request: Request) { | ||
return new Response('Hello, from API!'); | ||
} |
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,36 @@ | ||
'use client'; | ||
|
||
import { useEffect } from 'react'; | ||
import Head from 'next/head'; | ||
import { | ||
WebbUIProvider, | ||
useDarkMode, | ||
Footer, | ||
} from '@webb-tools/webb-ui-components'; | ||
import '@webb-tools/webb-ui-components/tailwind.css'; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const [, setIsDarkMode] = useDarkMode(); | ||
|
||
useEffect(() => { | ||
setIsDarkMode('light'); | ||
}, [setIsDarkMode]); | ||
|
||
return ( | ||
<html lang="en"> | ||
<WebbUIProvider defaultThemeMode="light"> | ||
<Head> | ||
<title>Welcome to Hubble Stats!</title> | ||
</Head> | ||
<body> | ||
{children} | ||
<Footer isMinimal /> | ||
</body> | ||
</WebbUIProvider> | ||
</html> | ||
); | ||
} |
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 @@ | ||
export default async function Index() { | ||
return <div></div>; | ||
} |
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 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
declare module '*.svg' { | ||
const content: any; | ||
export const ReactComponent: any; | ||
export default content; | ||
} |
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,11 @@ | ||
/* eslint-disable */ | ||
export default { | ||
displayName: 'hubble-stats', | ||
preset: '../../jest.preset.js', | ||
transform: { | ||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest', | ||
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/next/babel'] }], | ||
}, | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
coverageDirectory: '../../coverage/apps/hubble-stats', | ||
}; |
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,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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,26 @@ | ||
//@ts-check | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const { composePlugins, withNx } = require('@nx/next'); | ||
|
||
/** | ||
* @type {import('@nx/next/plugins/with-nx').WithNxOptions} | ||
**/ | ||
const nextConfig = { | ||
nx: { | ||
// Set this to true if you would like to use SVGR | ||
// See: https://github.com/gregberge/svgr | ||
svgr: false, | ||
}, | ||
|
||
experimental: { | ||
appDir: true, | ||
}, | ||
}; | ||
|
||
const plugins = [ | ||
// Add more Next.js plugins to this list if needed. | ||
withNx, | ||
]; | ||
|
||
module.exports = composePlugins(...plugins)(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,17 @@ | ||
const { join } = require('path'); | ||
|
||
// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build | ||
// option from your application's configuration (i.e. project.json). | ||
// | ||
// See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries | ||
|
||
module.exports = { | ||
plugins: { | ||
'postcss-import': {}, | ||
'tailwindcss/nesting': {}, | ||
tailwindcss: { | ||
config: join(__dirname, 'tailwind.config.js'), | ||
}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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,69 @@ | ||
{ | ||
"name": "hubble-stats", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/hubble-stats", | ||
"projectType": "application", | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/next:build", | ||
"outputs": ["{options.outputPath}"], | ||
"defaultConfiguration": "production", | ||
"options": { | ||
"root": "apps/hubble-stats", | ||
"outputPath": "dist/apps/hubble-stats" | ||
}, | ||
"configurations": { | ||
"development": { | ||
"outputPath": "apps/hubble-stats" | ||
}, | ||
"production": {} | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nx/next:server", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "hubble-stats:build", | ||
"dev": true | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "hubble-stats:build:development", | ||
"dev": true | ||
}, | ||
"production": { | ||
"buildTarget": "hubble-stats:build:production", | ||
"dev": false | ||
} | ||
} | ||
}, | ||
"export": { | ||
"executor": "@nx/next:export", | ||
"options": { | ||
"buildTarget": "hubble-stats:build:production" | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "apps/hubble-stats/jest.config.ts", | ||
"passWithNoTests": true | ||
}, | ||
"configurations": { | ||
"ci": { | ||
"ci": true, | ||
"codeCoverage": true | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/linter:eslint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["apps/hubble-stats/**/*.{ts,tsx,js,jsx}"] | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); | ||
const { join } = require('path'); | ||
|
||
const preset = require('@webb-tools/tailwind-preset'); | ||
|
||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
presets: [preset], | ||
content: [ | ||
join( | ||
__dirname, | ||
'{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' | ||
), | ||
join( | ||
__dirname, | ||
'../../libs/webb-ui-components', | ||
'src/{pages,components}/**/*!(*.stories|*.spec).{ts,tsx,html}' | ||
), | ||
...createGlobPatternsForDependencies(__dirname), | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
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,38 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"jsx": "preserve", | ||
"allowJs": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"incremental": true, | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"types": [ | ||
"jest", | ||
"node" | ||
] | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"**/*.js", | ||
"**/*.jsx", | ||
"next-env.d.ts", | ||
"../../apps/hubble-stats/.next/types/**/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"jest.config.ts", | ||
"src/**/*.spec.ts", | ||
"src/**/*.test.ts" | ||
] | ||
} |
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,21 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../../dist/out-tsc", | ||
"module": "commonjs", | ||
"types": ["jest", "node"], | ||
"jsx": "react" | ||
}, | ||
"include": [ | ||
"jest.config.ts", | ||
"src/**/*.test.ts", | ||
"src/**/*.spec.ts", | ||
"src/**/*.test.tsx", | ||
"src/**/*.spec.tsx", | ||
"src/**/*.test.js", | ||
"src/**/*.spec.js", | ||
"src/**/*.test.jsx", | ||
"src/**/*.spec.jsx", | ||
"src/**/*.d.ts" | ||
] | ||
} |
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
Oops, something went wrong.