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} */
|
||||
const nextConfig = {
|
||||
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",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rapid-web/react": "^0.2.4",
|
||||
"@types/node": "20.4.2",
|
||||
"@types/react": "18.2.15",
|
||||
"@types/react-dom": "18.2.7",
|
||||
"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"
|
||||
}
|
||||
"name": "rapid-nextjs-testing",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "concurrently npm:dev@rapid npm:dev@next",
|
||||
"dev@rapid": "rapid run",
|
||||
"dev@next": "next dev",
|
||||
"lint": "npm run lint@js && npm run lint@rust",
|
||||
"lint@js": "eslint . --ext .js,.ts,.jsx,.tsx",
|
||||
"lint@rust": "cargo clippy --all-targets --all-features -- -D warnings",
|
||||
"format": "npm run format@js && npm run format@rust",
|
||||
"format@js": "prettier --write --ignore-unknown --no-error-on-unmatched-pattern .",
|
||||
"format@rust": "cargo fmt --all",
|
||||
"format-check": "npm run format-check@js && npm run format-check@rust",
|
||||
"format-check@js": "prettier --check --ignore-unknown --no-error-on-unmatched-pattern .",
|
||||
"format-check@rust": "cargo fmt --all --check",
|
||||
"clean": "npm run clean@js && npm run clean@rust",
|
||||
"clean@js": "rimraf node_modules && rimraf .next",
|
||||
"clean@rust": "cargo clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rapid-web/react": "^0.2.4",
|
||||
"@types/node": "20.4.2",
|
||||
"@types/react": "18.2.15",
|
||||
"@types/react-dom": "18.2.7",
|
||||
"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 = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
|
@ -1,27 +1,27 @@
|
||||
import type { Config } from 'tailwindcss';
|
||||
import type { Config } from "tailwindcss";
|
||||
import {
|
||||
rapidStylesPath,
|
||||
rapidTailwindTheme,
|
||||
rapidPlugin,
|
||||
} from '@rapid-web/ui';
|
||||
rapidStylesPath,
|
||||
rapidTailwindTheme,
|
||||
rapidPlugin,
|
||||
} from "@rapid-web/ui";
|
||||
|
||||
// Use this as your template paths directory if using nextjs app dir: "./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
|
||||
export default {
|
||||
content: [
|
||||
'./pages/**/*.{js,ts,jsx,tsx}',
|
||||
'./components/**/*.{js,ts,jsx,tsx}',
|
||||
rapidStylesPath,
|
||||
],
|
||||
theme: {
|
||||
extend: rapidTailwindTheme({
|
||||
// Extend the default rapid tailwind theme here (documentation coming soon)
|
||||
}),
|
||||
},
|
||||
plugins: [
|
||||
rapidPlugin({
|
||||
// Configure global styles variants here (documentation coming soon)
|
||||
global: {},
|
||||
}),
|
||||
],
|
||||
content: [
|
||||
"./pages/**/*.{js,ts,jsx,tsx}",
|
||||
"./components/**/*.{js,ts,jsx,tsx}",
|
||||
rapidStylesPath,
|
||||
],
|
||||
theme: {
|
||||
extend: rapidTailwindTheme({
|
||||
// Extend the default rapid tailwind theme here (documentation coming soon)
|
||||
}),
|
||||
},
|
||||
plugins: [
|
||||
rapidPlugin({
|
||||
// Configure global styles variants here (documentation coming soon)
|
||||
global: {},
|
||||
}),
|
||||
],
|
||||
} satisfies Config;
|
||||
|
Loading…
Reference in New Issue