Skip to content

Commit

Permalink
💅 feat: support tailwind css (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdsuwwz authored Aug 2, 2024
1 parent 235d297 commit bf30f67
Show file tree
Hide file tree
Showing 30 changed files with 7,181 additions and 1,116 deletions.
37 changes: 35 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
.next
node_modules
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# 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
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"javascript.preferences.importModuleSpecifier": "project-relative",
"typescript.suggest.jsdoc.generateReturns": false,
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
6 changes: 0 additions & 6 deletions components/counters.module.css

This file was deleted.

24 changes: 0 additions & 24 deletions components/counters.tsx

This file was deleted.

64 changes: 64 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import antfu from '@antfu/eslint-config'

const OFF = 0
const WARN = 1
const ERROR = 2

export default antfu({
ignores: [
'public',
'build',
'dist',
'node_modules',
'coverage',
'src/assets/**',
],
stylistic: {
indent: 2,
quotes: 'single',
overrides: {
'antfu/top-level-function': 'off',
'style/arrow-parens': 'off',
curly: 'off',
},
},
jsonc: true,
formatters: {
markdown: true,
},
typescript: true,
react: true,
markdown: true,
extends: [
'next/core-web-vitals',
],
rules: {
'antfu/top-level-function': OFF,
'react-dom/no-unsafe-target-blank': OFF,
'react-dom/no-missing-button-type': OFF,
'react-hooks/exhaustive-deps': WARN,
'react/no-useless-fragment': OFF,

'unused-imports/no-unused-vars': WARN,
curly: [ERROR, 'multi-line', 'consistent'],

'no-multiple-empty-lines': [
ERROR,
{
max: 3,
},
],
'no-console': WARN,

'style/jsx-self-closing-comp': [ERROR, {
component: true,
html: false,
}],
'style/no-multiple-empty-lines': [ERROR, {
max: 2,
maxEOF: 0,
}],
'style/max-statements-per-line': ERROR,
'style/quote-props': [ERROR, 'as-needed'],
},
})
8 changes: 0 additions & 8 deletions next.config.js

This file was deleted.

14 changes: 14 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import createWithNextra from 'nextra'

const withNextra = createWithNextra({
theme: 'nextra-theme-docs',
themeConfig: './src/theme.config.tsx',
})


export default withNextra({
images: {
unoptimized: true,
},
reactStrictMode: true,
})
30 changes: 21 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"description": "Next.js Nextra docs starter",
"type": "module",
"scripts": {
"dev": "next dev -p 7788",
"dev": "next dev -p 8000",
"build": "next build",
"start": "next start"
"start": "next start -p 7000",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
},
"repository": {
"type": "git",
Expand All @@ -19,14 +21,24 @@
},
"homepage": "https://github.com/pdsuwwz/nextjs-nextra-starter#readme",
"dependencies": {
"next": "^13.0.6",
"nextra": "latest",
"nextra-theme-docs": "latest",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"next": "14.2.5",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "18.11.10",
"typescript": "^4.9.3"
"@antfu/eslint-config": "^2.24.1",
"@eslint-react/eslint-plugin": "^1.7.1",
"@types/node": "^22.0.2",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"eslint": "^9.8.0",
"eslint-config-next": "14.2.5",
"eslint-plugin-format": "^0.1.2",
"eslint-plugin-react-refresh": "^0.4.9",
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4"
}
}
15 changes: 0 additions & 15 deletions pages/_meta.json

This file was deleted.

3 changes: 0 additions & 3 deletions pages/about.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions pages/advanced.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions pages/advanced/satori.mdx

This file was deleted.

31 changes: 0 additions & 31 deletions pages/another.mdx

This file was deleted.

11 changes: 0 additions & 11 deletions pages/index.mdx

This file was deleted.

Loading

0 comments on commit bf30f67

Please sign in to comment.