mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Cleanup dev environment
This commit is contained in:
parent
3e7a39e250
commit
c49bcf070e
8 changed files with 135 additions and 1366 deletions
12
.sequelizerc
12
.sequelizerc
|
|
@ -1,12 +0,0 @@
|
||||||
require('babel-register')
|
|
||||||
require('dotenv').config()
|
|
||||||
|
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
// prettier-ignore
|
|
||||||
'config': JSON.parse(process.env.SEQUELIZE || '{}') || {},
|
|
||||||
'models-path': path.resolve('src/server/sequelize/models'),
|
|
||||||
'seeders-path': path.resolve('src/server/sequelize/seeders'),
|
|
||||||
'migrations-path': path.resolve('src/server/sequelize/migrations')
|
|
||||||
}
|
|
||||||
23
.vscode/launch.json
vendored
23
.vscode/launch.json
vendored
|
|
@ -1,9 +1,28 @@
|
||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
|
"compounds": [
|
||||||
|
{
|
||||||
|
"name": "Development Server",
|
||||||
|
"configurations": ["Prisma: Development server", "GQL: Development server", "Astro: Development server"],
|
||||||
|
"stopAll": false
|
||||||
|
}
|
||||||
|
],
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"command": "npm run dev",
|
"command": "npx prisma generate --watch",
|
||||||
"name": "Development server",
|
"name": "Prisma: Development server",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node-terminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "npx graphql-codegen -w",
|
||||||
|
"name": "GQL: Development server",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "node-terminal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "npx astro dev",
|
||||||
|
"name": "Astro: Development server",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"type": "node-terminal"
|
"type": "node-terminal"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
import { defineConfig, envField } from 'astro/config'
|
import { defineConfig } from 'astro/config'
|
||||||
import tailwind from '@astrojs/tailwind'
|
import tailwind from '@astrojs/tailwind'
|
||||||
import node from '@astrojs/node'
|
import node from '@astrojs/node'
|
||||||
import paraglide from '@inlang/paraglide-astro'
|
import paraglide from '@inlang/paraglide-astro'
|
||||||
|
|
@ -26,12 +26,5 @@ export default defineConfig({
|
||||||
icon({ iconDir: 'src/img/icons' })
|
icon({ iconDir: 'src/img/icons' })
|
||||||
],
|
],
|
||||||
output: 'server',
|
output: 'server',
|
||||||
adapter: node({ mode: 'standalone' }),
|
adapter: node({ mode: 'standalone' })
|
||||||
experimental: {
|
|
||||||
env: {
|
|
||||||
schema: {
|
|
||||||
SEQUELIZE: envField.string({ context: 'server', access: 'public' })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,20 @@
|
||||||
import neostandard from 'neostandard'
|
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
|
||||||
import eslintConfigPrettier from 'eslint-config-prettier'
|
import eslintConfigPrettier from 'eslint-config-prettier'
|
||||||
|
|
||||||
import eslintPluginAstro from 'eslint-plugin-astro'
|
import eslintPluginAstro from 'eslint-plugin-astro'
|
||||||
|
|
||||||
|
const neoConfig = neostandard({ ignores: resolveIgnoresFromGitignore(), noStyle: true, ts: true})
|
||||||
|
|
||||||
/** @type {import("eslint").Linter.Config} */
|
/** @type {import("eslint").Linter.Config} */
|
||||||
export default [
|
export default [
|
||||||
...neostandard(),
|
...neoConfig,
|
||||||
|
{
|
||||||
|
files: ['**/*.ts', '**/*.tsx'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-unused-vars': 'warn',
|
||||||
|
'no-undef': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
...eslintPluginAstro.configs.recommended,
|
||||||
eslintConfigPrettier,
|
eslintConfigPrettier,
|
||||||
...eslintPluginAstro.configs.recommended
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
24
package.json
24
package.json
|
|
@ -3,41 +3,31 @@
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "concurrently \"npm:gql:watch\" \"npm:astro:dev\"",
|
"start": "npm run dev",
|
||||||
"astro:dev": "astro dev",
|
"dev": "concurrently \"prisma generate --watch\" \"graphql-codegen -w\" \"astro dev\"",
|
||||||
"build": "npm run paraglide:compile && npm run gql:compile && astro build",
|
"build": "npm run paraglide:compile && prisma generate && graphql-codegen && astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"gql:compile": "graphql-codegen",
|
|
||||||
"gql:watch": "graphql-codegen -w",
|
|
||||||
"paraglide:compile": "paraglide-js compile --project ./project.inlang --outdir ./src\\paraglide"
|
"paraglide:compile": "paraglide-js compile --project ./project.inlang --outdir ./src\\paraglide"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.11.4",
|
"@apollo/client": "^3.11.4",
|
||||||
"@astrojs/check": "^0.9.3",
|
|
||||||
"@astrojs/node": "^8.3.3",
|
"@astrojs/node": "^8.3.3",
|
||||||
"@astrojs/rss": "^4.0.7",
|
"@astrojs/rss": "^4.0.7",
|
||||||
"@astrojs/tailwind": "^5.1.1",
|
"@astrojs/tailwind": "^5.1.1",
|
||||||
"@auth/core": "^0.35.0",
|
"@auth/core": "^0.35.0",
|
||||||
"@eddeee888/gcg-typescript-resolver-files": "^0.10.4",
|
"@eddeee888/gcg-typescript-resolver-files": "^0.10.4",
|
||||||
"@graphql-codegen/cli": "^5.0.2",
|
"@graphql-codegen/cli": "^5.0.2",
|
||||||
"@graphql-tools/load-files": "^7.0.0",
|
|
||||||
"@graphql-tools/merge": "^9.0.6",
|
"@graphql-tools/merge": "^9.0.6",
|
||||||
"@graphql-tools/resolvers-composition": "^7.0.1",
|
"@graphql-tools/resolvers-composition": "^7.0.1",
|
||||||
"@graphql-tools/schema": "^10.0.4",
|
"@graphql-tools/schema": "^10.0.4",
|
||||||
"@inlang/paraglide-astro": "^0.2.2",
|
"@inlang/paraglide-astro": "^0.2.2",
|
||||||
"@sequelize/cli": "^7.0.0-alpha.42",
|
"@prisma/client": "^5.22.0",
|
||||||
"@sequelize/core": "^7.0.0-alpha.37",
|
|
||||||
"@sequelize/mysql": "^7.0.0-alpha.41",
|
|
||||||
"astro": "^4.15.7",
|
"astro": "^4.15.7",
|
||||||
"astro-icon": "^1.1.1",
|
"astro-icon": "^1.1.1",
|
||||||
"auth-astro": "^4.1.2",
|
"auth-astro": "^4.1.2",
|
||||||
"babel-register": "^6.26.0",
|
|
||||||
"bcrypt": "^5.1.1",
|
"bcrypt": "^5.1.1",
|
||||||
"dotenv": "^16.4.5",
|
|
||||||
"fs-extra": "^11.2.0",
|
|
||||||
"graphql": "^16.9.0",
|
"graphql": "^16.9.0",
|
||||||
"graphql-scalars": "^1.23.0",
|
"graphql-scalars": "^1.23.0",
|
||||||
"lodash": "^4.17.21",
|
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"tailwindcss": "^3.4.12",
|
"tailwindcss": "^3.4.12",
|
||||||
"typescript": "^5.6.2"
|
"typescript": "^5.6.2"
|
||||||
|
|
@ -46,7 +36,6 @@
|
||||||
"@inlang/paraglide-js": "1.11.2",
|
"@inlang/paraglide-js": "1.11.2",
|
||||||
"@parcel/watcher": "^2.4.1",
|
"@parcel/watcher": "^2.4.1",
|
||||||
"@types/bcrypt": "^5.0.2",
|
"@types/bcrypt": "^5.0.2",
|
||||||
"@typescript-eslint/parser": "^8.7.0",
|
|
||||||
"concurrently": "^8.2.2",
|
"concurrently": "^8.2.2",
|
||||||
"eslint": "^9.11.1",
|
"eslint": "^9.11.1",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
|
@ -54,6 +43,7 @@
|
||||||
"eslint-plugin-jsx-a11y": "^6.10.0",
|
"eslint-plugin-jsx-a11y": "^6.10.0",
|
||||||
"neostandard": "^0.11.6",
|
"neostandard": "^0.11.6",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"prettier-plugin-astro": "^0.14.1"
|
"prettier-config-standard": "^7.0.0",
|
||||||
|
"prisma": "^5.22.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,6 @@
|
||||||
const merge = require('lodash/merge')
|
|
||||||
const prettierConfigStandard = require('prettier-config-standard')
|
const prettierConfigStandard = require('prettier-config-standard')
|
||||||
|
|
||||||
/** @type {import("prettier").Config} */
|
/** @type {import("prettier").Config} */
|
||||||
const config = merge(prettierConfigStandard, {
|
const config = {...prettierConfigStandard, printWidth: 120}
|
||||||
plugins: [require.resolve('prettier-plugin-astro')],
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: '*.astro',
|
|
||||||
options: {
|
|
||||||
parser: 'astro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
module.exports = config
|
module.exports = config
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{
|
||||||
"extends": "astro/tsconfigs/strict",
|
"extends": "astro/tsconfigs/strict",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"jsx": "react-jsx",
|
||||||
"moduleResolution": "Bundler",
|
"jsxImportSource": "react",
|
||||||
"allowJs": true,
|
|
||||||
"baseUrl": "src",
|
"baseUrl": "src",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/graphql/*": [
|
"@/graphql/*": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue