feat: Initial project structure

This commit is contained in:
2026-05-07 11:22:21 -04:00
commit 04b199719e
10 changed files with 1620 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
node_modules/
dist/
.cache/
.DS_Store
*.log

1
.husky/pre-commit Executable file
View File

@@ -0,0 +1 @@
corepack pnpm lint-staged

4
.oxfmtrc.json Normal file
View File

@@ -0,0 +1,4 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": []
}

11
.oxlintrc.json Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "unicorn", "oxc"],
"categories": {
"correctness": "error"
},
"rules": {},
"env": {
"builtin": true
}
}

1
CHANGELOG.md Normal file
View File

@@ -0,0 +1 @@
# Changelog

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# @lewebsimple/wpop
WordPress operations CLI for Websimple projects.

54
package.json Normal file
View File

@@ -0,0 +1,54 @@
{
"name": "@lewebsimple/wpop",
"version": "0.0.0",
"private": true,
"description": "WordPress operations CLI for Websimple projects.",
"author": "Pascal Martineau <pascal@lewebsimple.ca>",
"bin": {
"wpop": "./dist/cli.js"
},
"files": [
"dist"
],
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json",
"changelog": "changelogen",
"check": "npm run format:check && npm run lint && npm run typecheck",
"dev": "tsx src/cli.ts",
"format:check": "oxfmt . --check",
"format": "oxfmt . --write",
"lint:fix": "oxlint . --fix",
"lint": "oxlint .",
"prepare": "husky",
"release": "changelogen --release --push --noAuthors",
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"commander": "^14.0.3",
"consola": "^3.4.2",
"execa": "^9.6.1",
"prompts": "^2.4.2",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/node": "^25.6.0",
"@types/prompts": "^2.4.9",
"changelogen": "^0.6.2",
"husky": "^9.1.7",
"lint-staged": "^17.0.2",
"oxfmt": "^0.48.0",
"oxlint": "^1.63.0",
"tsx": "^4.21.0",
"typescript": "^6.0.3"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,jsonc,md,yml,yaml}": [
"oxfmt --write"
],
"*.{js,jsx,ts,tsx}": [
"oxlint --fix"
]
},
"packageManager": "pnpm@10.33.2"
}

1499
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

23
src/cli.ts Normal file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env node
import { Command } from "commander";
import pkg from "../package.json" with { type: "json" };
const program = new Command();
program
.name("wpop")
.description("WordPress operations CLI for Websimple projects.")
.version(pkg.version)
.option("--dry-run", "show what would happen without making changes")
.option("--json", "output machine-readable JSON")
.option("--yes", "skip confirmation prompts")
.option("--verbose", "enable verbose logging");
program
.command("deploy")
.description("Deploy a WordPress project")
.action(() => {
throw new Error("Not implemented yet.");
});
program.parse();

19
tsconfig.json Normal file
View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "ES2023",
"lib": ["ES2023"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": ["node"],
"resolveJsonModule": true,
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"declaration": true,
"sourceMap": true,
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*.ts"]
}