Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ jobs:
- name: Type-check
run: npx tsc --project tsconfig.json

- name: Build frontend
run: yarn workspace @rwdocs/backstage-plugin-rw run build

- name: Build backend
run: yarn workspace @rwdocs/backstage-plugin-rw-backend run build

- name: Lint
run: |
yarn workspace @rwdocs/backstage-plugin-rw run lint
yarn workspace @rwdocs/backstage-plugin-rw-backend run lint

- name: Format check
run: npx prettier --check "plugins/*/src/**"
run: |
yarn workspace @rwdocs/backstage-plugin-rw run format:check
yarn workspace @rwdocs/backstage-plugin-rw-backend run format:check

- name: Build frontend
run: yarn workspace @rwdocs/backstage-plugin-rw run build

- name: Build backend
run: yarn workspace @rwdocs/backstage-plugin-rw-backend run build
11 changes: 7 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ Backstage plugin pair for embedding RW documentation sites. Yarn 4.12.0 workspac
## Commands

```bash
# Full build + lint + format
# Full build + typecheck + lint + format
make all

# Build all plugins (install deps, type-check, backstage-cli build)
# Build all plugins (install deps, backstage-cli build)
make build

# Lint (TypeScript strict mode via tsc --noEmit)
# Type-check (tsc --noEmit across all plugins)
make typecheck

# Lint (ESLint via backstage-cli package lint)
make lint

# Format (Prettier, printWidth: 100)
Expand All @@ -33,7 +36,7 @@ yarn workspace @rwdocs/backstage-plugin-rw run lint
yarn workspace @rwdocs/backstage-plugin-rw-backend run lint
```

No test framework is configured.
Tests use `backstage-cli package test` (Jest). No tests have been written yet.

## Architecture

Expand Down
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
all: build lint format
all: typecheck lint format build

build:
install:
yarn install
npx tsc --project tsconfig.json

build: install
yarn workspace @rwdocs/backstage-plugin-rw run build
yarn workspace @rwdocs/backstage-plugin-rw-backend run build

lint:
typecheck: install
npx tsc --project tsconfig.json

lint: install
yarn workspace @rwdocs/backstage-plugin-rw run lint
yarn workspace @rwdocs/backstage-plugin-rw-backend run lint

format:
format: install
yarn workspace @rwdocs/backstage-plugin-rw run format
yarn workspace @rwdocs/backstage-plugin-rw-backend run format

format\:check: install
yarn workspace @rwdocs/backstage-plugin-rw run format:check
yarn workspace @rwdocs/backstage-plugin-rw-backend run format:check

clean:
yarn workspace @rwdocs/backstage-plugin-rw run clean
yarn workspace @rwdocs/backstage-plugin-rw-backend run clean
1 change: 1 addition & 0 deletions plugins/rw-backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
10 changes: 8 additions & 2 deletions plugins/rw-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "backend-plugin",
Expand All @@ -24,10 +26,13 @@
"config.d.ts"
],
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"lint": "tsc --noEmit",
"format": "prettier --write src/",
"format:check": "prettier --check src/",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack"
},
Expand All @@ -44,6 +49,7 @@
"@backstage/cli": "^0.35.0",
"@types/express": "^4.17.0",
"@types/jest": "^30.0.0",
"jest": "^30.0.0",
"prettier": "^3.4.2",
"typescript": "^5.7.0"
}
Expand Down
1 change: 1 addition & 0 deletions plugins/rw/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
11 changes: 9 additions & 2 deletions plugins/rw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
"access": "public",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "frontend-plugin",
Expand All @@ -22,10 +25,13 @@
"dist"
],
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"lint": "tsc --noEmit",
"format": "prettier --write src/",
"format:check": "prettier --check src/",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack"
},
Expand All @@ -49,6 +55,7 @@
"@backstage/plugin-catalog-react": "^2.0.0",
"@types/jest": "^30.0.0",
"@types/react": "^18.0.0",
"jest": "^30.0.0",
"prettier": "^3.4.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand Down
1 change: 1 addition & 0 deletions plugins/rw/src/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const rwEntityContent = EntityContentBlueprint.make({
params: {
path: "docs",
title: "Documentation",
group: "documentation",
loader: () => import("./components/RwDocsViewer").then((m) => <m.RwDocsViewer />),
},
});
Expand Down
Loading