-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(admin): 🎉 admin initialize with tailwind
- Loading branch information
1 parent
20f3841
commit 524d87a
Showing
14 changed files
with
15,557 additions
and
0 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,31 @@ | ||
{ | ||
"extends": [ | ||
"plugin:@nx/react-typescript", | ||
"next", | ||
"next/core-web-vitals", | ||
"../../.eslintrc.json" | ||
], | ||
"ignorePatterns": ["!**/*", ".next/**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.*"], | ||
"rules": { | ||
"@next/next/no-html-link-for-pages": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@next/next/no-html-link-for-pages": ["error", "apps/admin/pages"] | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
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,30 @@ | ||
//@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 to use SVGR | ||
// See: https://github.com/gregberge/svgr | ||
svgr: false, | ||
}, | ||
|
||
compiler: { | ||
// For other options, see https://styled-components.com/docs/tooling#babel-plugin | ||
styledComponents: true, | ||
}, | ||
experimental: { | ||
typedRoutes: 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,15 @@ | ||
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: { | ||
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,54 @@ | ||
{ | ||
"name": "admin", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/admin", | ||
"projectType": "application", | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/next:build", | ||
"outputs": ["{options.outputPath}"], | ||
"defaultConfiguration": "production", | ||
"options": { | ||
"outputPath": "dist/apps/admin" | ||
}, | ||
"configurations": { | ||
"development": { | ||
"outputPath": "apps/admin" | ||
}, | ||
"production": {} | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nx/next:server", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "admin:build", | ||
"dev": true | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "admin:build:development", | ||
"dev": true | ||
}, | ||
"production": { | ||
"buildTarget": "admin:build:production", | ||
"dev": false | ||
} | ||
} | ||
}, | ||
"export": { | ||
"executor": "@nx/next:export", | ||
"options": { | ||
"buildTarget": "admin:build:production" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["apps/admin/**/*.{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,21 @@ | ||
import '../styles/global.css'; | ||
import { StyledComponentsRegistry } from './registry'; | ||
|
||
export const metadata = { | ||
title: 'Welcome to demo2', | ||
description: 'Generated by create-nx-workspace', | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body> | ||
<StyledComponentsRegistry>{children}</StyledComponentsRegistry> | ||
</body> | ||
</html> | ||
); | ||
} |
Oops, something went wrong.