initial
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
.idea
|
||||
*.lock
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
.yarn/install-state.gz
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
.next
|
||||
.husky
|
||||
coverage
|
||||
.prettierignore
|
||||
.stylelintignore
|
||||
.eslintignore
|
||||
@@ -0,0 +1,29 @@
|
||||
// @ts-check
|
||||
|
||||
module.exports = {
|
||||
// Standard prettier options
|
||||
trailingComma: "all",
|
||||
tabWidth: 2,
|
||||
useTabs: true,
|
||||
singleQuote: false,
|
||||
jsxSingleQuote: false,
|
||||
semi: false,
|
||||
|
||||
plugins: ["@ianvs/prettier-plugin-sort-imports"],
|
||||
|
||||
importOrder: [
|
||||
"<TYPES>",
|
||||
"",
|
||||
"react",
|
||||
"",
|
||||
"<THIRD_PARTY_MODULES>",
|
||||
"",
|
||||
"^(@shared|@entities|@features|@widgets|@pages|@app)(/.*)$",
|
||||
"",
|
||||
"^(?!.*[.]scss$)[./].*$",
|
||||
".scss$",
|
||||
"^[.]",
|
||||
],
|
||||
importOrderParserPlugins: ["typescript", "jsx", "decorators-legacy"],
|
||||
importOrderTypeScriptVersion: "5.0.0",
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-standard",
|
||||
"stylelint-config-standard-scss",
|
||||
"stylelint-order-config-standard"
|
||||
],
|
||||
"plugins": ["stylelint-order"],
|
||||
"rules": {}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
# Next.js + Feature-Sliced Design | Pure Template
|
||||
|
||||
## Folders description
|
||||
| Folder | Description |
|
||||
|--------------|-----------------------------------------------------------------------------------------------------------------|
|
||||
| app | Next App folder for [App Routing](https://nextjs.org/docs/app/building-your-application/routing#the-app-router) |
|
||||
| public | Public files |
|
||||
| src/app | App FSD Layer |
|
||||
| src/pages | Pages FSD Layer |
|
||||
| src/widgets | Widgets FSD Layer |
|
||||
| src/features | Features FSD Layer |
|
||||
| src/entities | Entities FSD Layer |
|
||||
| src/shared | Shared FSD Layer |
|
||||
|
||||
|
||||
## Remove junk _.gitkeep_ files
|
||||
|
||||
### UNIX
|
||||
```bash
|
||||
rm -rf .src/app/.gitkeep .src/entities/.gitkeep .src/features/.gitkeep .src/shared/.gitkeep .src/widgets/.gitkeep ./public/.gitkeep
|
||||
```
|
||||
|
||||
### WINDOWS
|
||||
```bash
|
||||
del .\src\app\.gitkeep
|
||||
del .\src\entities\.gitkeep
|
||||
del .\src\features\.gitkeep
|
||||
del .\src\shared\.gitkeep
|
||||
del .\src\widgets\.gitkeep
|
||||
del .\public\.gitkeep
|
||||
```
|
||||
|
||||
This template uses such development assistants
|
||||
|
||||
* Eslint
|
||||
* Prettier
|
||||
* Stylelint
|
||||
|
||||
|
||||
If you don't need it, you can disable it at any time by removing the
|
||||
dependency from your _package.json_ and _.*rc_ file.
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { Metadata } from "next"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
import "@app/styles/global.scss"
|
||||
|
||||
|
||||
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Let's Develop!",
|
||||
description: "FSD Template with Next.js by yunglocokid",
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: ReactNode
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import {HomePage} from "@pages/HomePage";
|
||||
|
||||
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main>
|
||||
<HomePage/>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {}
|
||||
|
||||
export default nextConfig
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "fsd-nest-template",
|
||||
"description": "Pure Next.js FSD template with stylelint, prettier and eslint",
|
||||
"author": {
|
||||
"name": "@yunglocokid (Dmitriy Bratchikov)",
|
||||
"url": "https://github.com/yunglocokid"
|
||||
},
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "14.2.3",
|
||||
"normalize.css": "^8.0.1",
|
||||
"react": "^18",
|
||||
"react-dom": "^18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18",
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.2.3",
|
||||
"prettier": "^3.2.5",
|
||||
"sass": "^1.77.1",
|
||||
"stylelint": "^16.5.0",
|
||||
"stylelint-config-standard": "^36.0.0",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"stylelint-order": "^6.0.4",
|
||||
"stylelint-order-config-standard": "^0.1.3",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
@import "normalize.css";
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
border: 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import HomePage from "@pages/HomePage/ui/HomePage";
|
||||
|
||||
export {
|
||||
HomePage
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
.homepage {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
|
||||
height: 100vh;
|
||||
|
||||
color: #C7D0CC;
|
||||
|
||||
background: #000;
|
||||
|
||||
font-family: Roboto, sans-serif;
|
||||
font-size: 2vw;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.path {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.font {
|
||||
font-size: 5vw;
|
||||
}
|
||||
|
||||
.hint {
|
||||
padding: .5rem;
|
||||
|
||||
pointer-events: none;
|
||||
|
||||
border: rgb(199 208 204 / 5%) 1px solid;
|
||||
border-radius: 15px;
|
||||
|
||||
font-size: 1vw;
|
||||
}
|
||||
|
||||
.link {
|
||||
transition: 0.3s;
|
||||
animation: shine 4s linear infinite;
|
||||
|
||||
color: #000;
|
||||
background: linear-gradient(to right, #020024 10%, #5b0979 40%, #5b0979 60%, #020024 80%);
|
||||
background-clip: text;
|
||||
background-size: 200% auto;
|
||||
|
||||
font-size: 5vw;
|
||||
-webkit-text-fill-color: transparent;
|
||||
|
||||
@keyframes shine {
|
||||
to {
|
||||
background-position: 200% center;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import Link from "next/link"
|
||||
|
||||
import cls from "./HomePage.module.scss"
|
||||
|
||||
const HomePage = () => {
|
||||
return (
|
||||
<div className={cls.homepage}>
|
||||
<p className={cls.font}>
|
||||
Hello from{" "}
|
||||
<Link
|
||||
href="https://github.com/yunglocokid"
|
||||
target="_blank"
|
||||
className={cls.link}
|
||||
>
|
||||
yunglocokid
|
||||
</Link>
|
||||
</p>
|
||||
<pre className={cls.hint}>
|
||||
You can edit <span className={cls.path}>{"src/pages/HomePage"}</span> to
|
||||
start!
|
||||
</pre>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default HomePage
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@app/*": ["./src/app/*"],
|
||||
"@entities/*": ["./src/entities/*"],
|
||||
"@features/*": ["./src/features/*"],
|
||||
"@pages/*": ["./src/pages/*"],
|
||||
"@shared/*": ["./src/shared/*"],
|
||||
"@widgets/*": ["./src/widgets/*"],
|
||||
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user