Skip to content

Commit

Permalink
feat: initialize hubble-stats
Browse files Browse the repository at this point in the history
  • Loading branch information
vutuanlinh2k2 committed Jun 22, 2023
1 parent 278bfb0 commit 30d75ee
Show file tree
Hide file tree
Showing 19 changed files with 1,073 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ apps/stats-dapp/graphql.schema.json
.direnv

# Generated by json files
/**/generated/**/*.json
/**/generated/**/*.json
34 changes: 34 additions & 0 deletions apps/hubble-stats/.eslintrc.json
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
}
}
6 changes: 6 additions & 0 deletions apps/hubble-stats/index.d.ts
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;
}
11 changes: 11 additions & 0 deletions apps/hubble-stats/jest.config.ts
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',
};
5 changes: 5 additions & 0 deletions apps/hubble-stats/next-env.d.ts
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.
22 changes: 22 additions & 0 deletions apps/hubble-stats/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//@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,
},
};

const plugins = [
// Add more Next.js plugins to this list if needed.
withNx,
];

module.exports = composePlugins(...plugins)(nextConfig);
18 changes: 18 additions & 0 deletions apps/hubble-stats/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { AppProps } from 'next/app';
import Head from 'next/head';
import './styles.css';

function CustomApp({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<title>Welcome to hubble-stats!</title>
</Head>
<main className="app">
<Component {...pageProps} />
</main>
</>
);
}

export default CustomApp;
2 changes: 2 additions & 0 deletions apps/hubble-stats/pages/index.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.page {
}
Loading

0 comments on commit 30d75ee

Please sign in to comment.