build: add lint, formatting, and npm scripts
parent
a8000cd0f3
commit
748346fa6e
@ -0,0 +1,24 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
max_line_length = 80
|
||||||
|
|
||||||
|
[*.rs]
|
||||||
|
indent_size = 4
|
||||||
|
max_line_length = 100
|
||||||
|
|
||||||
|
[justfile]
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[pages/api/bindings.ts]
|
||||||
|
charset = unset
|
||||||
|
insert_final_newline = unset
|
||||||
|
end_of_line = unset
|
||||||
|
indent_style = unset
|
||||||
|
indent_size = unset
|
||||||
|
max_line_length = unset
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": "next/core-web-vitals"
|
"extends": ["next/core-web-vitals", "prettier"]
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# rust
|
||||||
|
target
|
||||||
|
Cargo.lock
|
||||||
|
|
||||||
|
# rapid build output
|
||||||
|
pages/api/bindings.ts
|
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": ".prettierrc",
|
||||||
|
"options": { "parser": "json" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name": "rapid-nextjs-testing",
|
"name": "rapid-nextjs-testing",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "concurrently npm:dev@rapid npm:dev@next",
|
||||||
"build": "next build",
|
"dev@rapid": "rapid run",
|
||||||
"start": "next start",
|
"dev@next": "next dev",
|
||||||
"lint": "next lint"
|
"lint": "npm run lint@js && npm run lint@rust",
|
||||||
},
|
"lint@js": "eslint . --ext .js,.ts,.jsx,.tsx",
|
||||||
"dependencies": {
|
"lint@rust": "cargo clippy --all-targets --all-features -- -D warnings",
|
||||||
"@rapid-web/react": "^0.2.4",
|
"format": "npm run format@js && npm run format@rust",
|
||||||
"@types/node": "20.4.2",
|
"format@js": "prettier --write --ignore-unknown --no-error-on-unmatched-pattern .",
|
||||||
"@types/react": "18.2.15",
|
"format@rust": "cargo fmt --all",
|
||||||
"@types/react-dom": "18.2.7",
|
"format-check": "npm run format-check@js && npm run format-check@rust",
|
||||||
"autoprefixer": "10.4.14",
|
"format-check@js": "prettier --check --ignore-unknown --no-error-on-unmatched-pattern .",
|
||||||
"eslint": "8.45.0",
|
"format-check@rust": "cargo fmt --all --check",
|
||||||
"eslint-config-next": "13.4.10",
|
"clean": "npm run clean@js && npm run clean@rust",
|
||||||
"next": "13.4.10",
|
"clean@js": "rimraf node_modules && rimraf .next",
|
||||||
"postcss": "8.4.26",
|
"clean@rust": "cargo clean"
|
||||||
"react": "18.2.0",
|
},
|
||||||
"react-dom": "18.2.0",
|
"dependencies": {
|
||||||
"tailwindcss": "3.3.3",
|
"@rapid-web/react": "^0.2.4",
|
||||||
"typescript": "5.1.6"
|
"@types/node": "20.4.2",
|
||||||
},
|
"@types/react": "18.2.15",
|
||||||
"devDependencies": {
|
"@types/react-dom": "18.2.7",
|
||||||
"@rapid-web/ui": "^0.2.2"
|
"autoprefixer": "10.4.14",
|
||||||
}
|
"eslint": "8.45.0",
|
||||||
|
"eslint-config-next": "13.4.10",
|
||||||
|
"next": "13.4.10",
|
||||||
|
"postcss": "8.4.26",
|
||||||
|
"react": "18.2.0",
|
||||||
|
"react-dom": "18.2.0",
|
||||||
|
"tailwindcss": "3.3.3",
|
||||||
|
"typescript": "5.1.6"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@rapid-web/ui": "^0.2.2",
|
||||||
|
"concurrently": "^8.2.0",
|
||||||
|
"eslint-config-prettier": "^8.9.0",
|
||||||
|
"prettier": "^2.8.8",
|
||||||
|
"prettier-plugin-toml": "^0.3.1",
|
||||||
|
"rimraf": "^5.0.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
tailwindcss: {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
@ -1,27 +1,27 @@
|
|||||||
import type { Config } from 'tailwindcss';
|
import type { Config } from "tailwindcss";
|
||||||
import {
|
import {
|
||||||
rapidStylesPath,
|
rapidStylesPath,
|
||||||
rapidTailwindTheme,
|
rapidTailwindTheme,
|
||||||
rapidPlugin,
|
rapidPlugin,
|
||||||
} from '@rapid-web/ui';
|
} from "@rapid-web/ui";
|
||||||
|
|
||||||
// Use this as your template paths directory if using nextjs app dir: "./app/**/*.{js,ts,jsx,tsx,mdx}",
|
// Use this as your template paths directory if using nextjs app dir: "./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
content: [
|
content: [
|
||||||
'./pages/**/*.{js,ts,jsx,tsx}',
|
"./pages/**/*.{js,ts,jsx,tsx}",
|
||||||
'./components/**/*.{js,ts,jsx,tsx}',
|
"./components/**/*.{js,ts,jsx,tsx}",
|
||||||
rapidStylesPath,
|
rapidStylesPath,
|
||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: rapidTailwindTheme({
|
extend: rapidTailwindTheme({
|
||||||
// Extend the default rapid tailwind theme here (documentation coming soon)
|
// Extend the default rapid tailwind theme here (documentation coming soon)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
rapidPlugin({
|
rapidPlugin({
|
||||||
// Configure global styles variants here (documentation coming soon)
|
// Configure global styles variants here (documentation coming soon)
|
||||||
global: {},
|
global: {},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
} satisfies Config;
|
} satisfies Config;
|
||||||
|
Loading…
Reference in New Issue