Cleanup dev environment

This commit is contained in:
Jorge Vargas 2024-11-13 22:45:30 -06:00
parent 3e7a39e250
commit c49bcf070e
8 changed files with 135 additions and 1366 deletions

View file

@ -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
View file

@ -1,9 +1,28 @@
{
"version": "0.2.0",
"compounds": [
{
"name": "Development Server",
"configurations": ["Prisma: Development server", "GQL: Development server", "Astro: Development server"],
"stopAll": false
}
],
"configurations": [
{
"command": "npm run dev",
"name": "Development server",
"command": "npx prisma generate --watch",
"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",
"type": "node-terminal"
}

View file

@ -1,5 +1,5 @@
// @ts-check
import { defineConfig, envField } from 'astro/config'
import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'
import node from '@astrojs/node'
import paraglide from '@inlang/paraglide-astro'
@ -26,12 +26,5 @@ export default defineConfig({
icon({ iconDir: 'src/img/icons' })
],
output: 'server',
adapter: node({ mode: 'standalone' }),
experimental: {
env: {
schema: {
SEQUELIZE: envField.string({ context: 'server', access: 'public' })
}
}
}
adapter: node({ mode: 'standalone' })
})

View file

@ -1,11 +1,20 @@
import neostandard from 'neostandard'
import neostandard, { resolveIgnoresFromGitignore } from 'neostandard'
import eslintConfigPrettier from 'eslint-config-prettier'
import eslintPluginAstro from 'eslint-plugin-astro'
const neoConfig = neostandard({ ignores: resolveIgnoresFromGitignore(), noStyle: true, ts: true})
/** @type {import("eslint").Linter.Config} */
export default [
...neostandard(),
...neoConfig,
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'no-undef': 'error'
}
},
...eslintPluginAstro.configs.recommended,
eslintConfigPrettier,
...eslintPluginAstro.configs.recommended
]

View file

@ -3,41 +3,31 @@
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "concurrently \"npm:gql:watch\" \"npm:astro:dev\"",
"astro:dev": "astro dev",
"build": "npm run paraglide:compile && npm run gql:compile && astro build",
"start": "npm run dev",
"dev": "concurrently \"prisma generate --watch\" \"graphql-codegen -w\" \"astro dev\"",
"build": "npm run paraglide:compile && prisma generate && graphql-codegen && astro build",
"preview": "astro preview",
"gql:compile": "graphql-codegen",
"gql:watch": "graphql-codegen -w",
"paraglide:compile": "paraglide-js compile --project ./project.inlang --outdir ./src\\paraglide"
},
"dependencies": {
"@apollo/client": "^3.11.4",
"@astrojs/check": "^0.9.3",
"@astrojs/node": "^8.3.3",
"@astrojs/rss": "^4.0.7",
"@astrojs/tailwind": "^5.1.1",
"@auth/core": "^0.35.0",
"@eddeee888/gcg-typescript-resolver-files": "^0.10.4",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-tools/load-files": "^7.0.0",
"@graphql-tools/merge": "^9.0.6",
"@graphql-tools/resolvers-composition": "^7.0.1",
"@graphql-tools/schema": "^10.0.4",
"@inlang/paraglide-astro": "^0.2.2",
"@sequelize/cli": "^7.0.0-alpha.42",
"@sequelize/core": "^7.0.0-alpha.37",
"@sequelize/mysql": "^7.0.0-alpha.41",
"@prisma/client": "^5.22.0",
"astro": "^4.15.7",
"astro-icon": "^1.1.1",
"auth-astro": "^4.1.2",
"babel-register": "^6.26.0",
"bcrypt": "^5.1.1",
"dotenv": "^16.4.5",
"fs-extra": "^11.2.0",
"graphql": "^16.9.0",
"graphql-scalars": "^1.23.0",
"lodash": "^4.17.21",
"react": "^18.3.1",
"tailwindcss": "^3.4.12",
"typescript": "^5.6.2"
@ -46,7 +36,6 @@
"@inlang/paraglide-js": "1.11.2",
"@parcel/watcher": "^2.4.1",
"@types/bcrypt": "^5.0.2",
"@typescript-eslint/parser": "^8.7.0",
"concurrently": "^8.2.2",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
@ -54,6 +43,7 @@
"eslint-plugin-jsx-a11y": "^6.10.0",
"neostandard": "^0.11.6",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1"
"prettier-config-standard": "^7.0.0",
"prisma": "^5.22.0"
}
}

View file

@ -1,17 +1,6 @@
const merge = require('lodash/merge')
const prettierConfigStandard = require('prettier-config-standard')
/** @type {import("prettier").Config} */
const config = merge(prettierConfigStandard, {
plugins: [require.resolve('prettier-plugin-astro')],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro'
}
}
]
})
const config = {...prettierConfigStandard, printWidth: 120}
module.exports = config

View file

@ -1,9 +1,8 @@
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"experimentalDecorators": true,
"moduleResolution": "Bundler",
"allowJs": true,
"jsx": "react-jsx",
"jsxImportSource": "react",
"baseUrl": "src",
"paths": {
"@/graphql/*": [

1398
yarn.lock

File diff suppressed because it is too large Load diff