chore: set up Makefile, linting, and dockerized dev shell
This commit is contained in:
25
Dockerfile.dev
Normal file
25
Dockerfile.dev
Normal file
@@ -0,0 +1,25 @@
|
||||
FROM node:20-slim
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
make \
|
||||
curl \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install DuckDB
|
||||
RUN curl -L https://github.com/duckdb/duckdb/releases/download/v0.10.0/duckdb_cli-linux-amd64.zip -o duckdb.zip \
|
||||
&& apt-get update && apt-get install -y unzip \
|
||||
&& unzip duckdb.zip -d /usr/local/bin \
|
||||
&& rm duckdb.zip
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip3 install duckdb ruff --break-system-packages
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
||||
42
Makefile
Normal file
42
Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
.PHONY: install dev lint shell task-list task-add task-done task-update
|
||||
|
||||
# Installation
|
||||
install:
|
||||
cd client && npm install
|
||||
cd server && npm install
|
||||
pip install duckdb ruff
|
||||
|
||||
# Development
|
||||
dev:
|
||||
docker compose up --build
|
||||
|
||||
# Linting
|
||||
lint:
|
||||
cd client && npm run lint || true
|
||||
ruff check tasks/
|
||||
|
||||
# Docker Shell
|
||||
shell:
|
||||
docker compose run --rm dev-shell
|
||||
|
||||
# Task Tracker Integration
|
||||
PYTHON=python3
|
||||
TASK_CLI=tasks/cli.py
|
||||
|
||||
task-list:
|
||||
$(PYTHON) $(TASK_CLI) list
|
||||
|
||||
task-add:
|
||||
$(PYTHON) $(TASK_CLI) add "$(title)"
|
||||
|
||||
task-done:
|
||||
$(PYTHON) $(TASK_CLI) done $(id)
|
||||
|
||||
task-update:
|
||||
$(PYTHON) $(TASK_CLI) update $(id) $(status)
|
||||
|
||||
task-delete:
|
||||
$(PYTHON) $(TASK_CLI) delete $(id)
|
||||
|
||||
task-filter:
|
||||
$(PYTHON) $(TASK_CLI) list --status $(status)
|
||||
21
client/.eslintrc.cjs
Normal file
21
client/.eslintrc.cjs
Normal file
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:vue/vue3-recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: [
|
||||
'vue',
|
||||
],
|
||||
rules: {
|
||||
'vue/multi-word-component-names': 'off',
|
||||
},
|
||||
};
|
||||
@@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"lint": "eslint . --ext .js, .vue --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@solana/web3.js": "^1.98.4",
|
||||
@@ -21,8 +22,10 @@
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-plugin-vue": "^9.21.1",
|
||||
"postcss": "^8.4.33",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"vite": "^7.2.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,3 +16,12 @@ services:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- server
|
||||
|
||||
dev-shell:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
volumes:
|
||||
- .:/app
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
|
||||
7
pyproject.toml
Normal file
7
pyproject.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
target-version = "py310"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["E", "F", "I"]
|
||||
ignore = []
|
||||
Reference in New Issue
Block a user