Skip to content

Commit

Permalink
chore: Migrate to the new plugin structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikenikles committed Aug 21, 2023
1 parent 0355d23 commit c2f2e29
Show file tree
Hide file tree
Showing 6 changed files with 858 additions and 140 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-tools-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"webstone-plugin-request-logger": minor
---

Migrate to the new plugin structure which combines the CLI & web parts.
32 changes: 16 additions & 16 deletions packages/plugin-request-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.2.0",
"scripts": {
"build": "npm run clean:build && npm run cli:build && npm run web:build",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"clean:build": "rimraf ./dist",
"cli:build": "node scripts/build-cli.js build && npm run templates:copy",
"cli:dev": "node scripts/build-cli.js dev",
Expand All @@ -16,9 +16,9 @@
"preview": "vite preview",
"templates:copy": "cp -a ./src/cli/templates ./dist/cli",
"templates:dev": "nodemon --watch src/cli/templates --ext '.ejs' --exec 'npm run templates:copy'",
"test": "npm run test:integration && npm run test:unit",
"test:integration": "playwright test",
"test:unit": "vitest",
"test": "npm run test:integration && npm run test:unit",
"web:build": "vite build && npm run package",
"web:dev": "vite dev"
},
Expand All @@ -37,30 +37,30 @@
"svelte": "^4.0.0"
},
"devDependencies": {
"@playwright/test": "^1.37.0",
"@playwright/test": "^1.37.1",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/kit": "^1.22.5",
"@sveltejs/kit": "^1.22.6",
"@sveltejs/package": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"@webstone/gluegun": "^0.0.5",
"eslint": "^8.46.0",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"@webstone/gluegun": "0.0.5",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte": "^2.32.4",
"fs-jetpack": "^5.1.0",
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.0.1",
"prettier": "^3.0.2",
"prettier-plugin-svelte": "^3.0.3",
"publint": "^0.2.0",
"rimraf": "^3.0.2",
"svelte": "^4.1.2",
"svelte-check": "^3.4.6",
"tslib": "^2.6.1",
"tsup": "^6.7.0",
"publint": "^0.2.1",
"rimraf": "^5.0.1",
"svelte": "^4.2.0",
"svelte-check": "^3.5.0",
"tslib": "^2.6.2",
"tsup": "^7.2.0",
"typescript": "^5.1.6",
"vite": "^4.4.9",
"vitest": "^0.34.1"
"vitest": "^0.34.2"
},
"svelte": "./dist/web/index.js",
"types": "./dist/web/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-request-logger/scripts/build-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { defineConfig, build } from 'tsup';
import jetpack from 'fs-jetpack';

/**
* //type {"build" | "dev"}
* @type {"build" | "dev"}
*/
const mode = process.argv[2];

// check if mode is valid
if (!['build', 'dev'].includes(mode)) {
console.log('Invalid mode');
console.log('Usage: node ./scripts/build-cli.js build|dev');
process.exit(1);
}

Expand Down
Loading

0 comments on commit c2f2e29

Please sign in to comment.