feat: add @algorandfoundation/devportal-docs package#572
Open
larkiny wants to merge 19 commits intoalgorandfoundation:refactor/library-enablementfrom
Open
feat: add @algorandfoundation/devportal-docs package#572larkiny wants to merge 19 commits intoalgorandfoundation:refactor/library-enablementfrom
larkiny wants to merge 19 commits intoalgorandfoundation:refactor/library-enablementfrom
Conversation
- Add pnpm workspace config and @algorandfoundation/devportal-docs package - Shared utilities: resolve-base (astro.config.mjs parsing), fs helpers (slug-exists, walk, file-index, fallback matching) - Type exports: DevportalSidebarConfig, SidebarItem (from Starlight) - 29 tests passing
…ar, build-manifest, build - normalize-links: path lowercasing, link normalization, readme rewriting, dead-link stripping (extracted from scripts/library-templates/) - build-sidebar: filter non-serializable entries, merge devportalFallbacks, write sidebar.json (uses tsx for .ts config import) - build-manifest: write manifest.json with site base and timestamp - build: orchestrator that runs all three in sequence - 38 new tests (67 total)
…sets - init: scaffold docs:devportal script, validate workflow composite action + permissions, check theme CSS reference (idempotent) - CLI: arg parsing, command dispatch for init/build/normalize-links/ build-sidebar/build-manifest - Theme: trimmed brand tokens + Starlight overrides (theme.css), font declarations (fonts.css), 14 font files (woff/woff2) - 28 new tests (95 total across 10 files)
- Add vitest.config.ts with test discovery and mock settings - Switch tsconfig to ESNext/Bundler resolution to avoid Starlight source file type-checking issues - Inline SidebarItem types to remove @astrojs/starlight dependency - Add @types/node as devDependency for Node.js built-in types
…package Delete scripts/library-templates/ (normalize-links.ts, build-sidebar-json.ts, build-manifest.ts, publish-devportal-docs.yml, README.md) now that all functionality lives in the @algorandfoundation/devportal-docs CLI package. Update root tsconfig.json to exclude packages/ instead of the removed directory.
Covers quick start, CLI commands, theme setup, type exports, build pipeline overview, and directory conventions.
…g.mjs Replace the read-only checkThemeReference with ensureThemeInConfig that inserts the theme import after the last existing import and prepends css, fonts to the customCss array. Supports --dry-run and is idempotent. Tested locally against algokit-utils-ts and algokit-utils-py.
- Add checkTailwind() that verifies tailwindcss is installed and is v4+ - Error if missing or < v4, warn if version range is unparseable - Add repository and publishConfig fields to package.json for npm publish
- Add .gitignore (dist/, node_modules/, *.tgz) - Extract shared walkMdDir() utility, eliminate duplicate walk implementations - Add --base flag validation in resolve-base.ts - Preserve original tsx error in build-sidebar.ts import fallback - Add try-catch to JSON.parse calls in init.ts and processFile() in normalize-links.ts - Fix TypeScript strict typing for pkg.scripts and dependency spreads - Add integration tests for init run() and normalize-links run() - Trim redundant tests via equivalence partitioning (113 → 106)
- Remove accidentally committed .tgz build artifact - Add Array.isArray guard for sidebar export in build-sidebar.ts - Include themeResult.status in init failure condition - Warn when customCss pattern not found in ensureThemeInConfig - Remove undocumented --verbose flag from CLI help and README - Add Tailwind v4 check to README init description
Add packages/* to root eslint ignores so compiled output isn't linted. Suppress no-control-regex for intentional \x00 placeholder pattern.
The loader now handles clearing import folders via its "clear" property, making this manual utility redundant. Also adds live site link to README.
Documents the approach for fixing PascalCase-to-lowercase renames that git doesn't track on macOS due to core.ignorecase=true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Three-task plan: caseRename helper in normalize-links.ts, fixGitCaseMismatches in import-release-docs.ts, and verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e-links
On macOS (core.ignorecase=true), renameSync('FooBar.md', 'foobar.md')
doesn't update git's index. Use a two-step rename via temp name and
best-effort git mv -f to ensure git tracks the case change.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On macOS (core.ignorecase=true), after rmSync + cp -R with lowercase content from a tarball, git's index may still track old PascalCase names. After extraction, compare git ls-files against the filesystem and use git mv -f to fix any case-only mismatches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@algorandfoundation/devportal-docs)devportal-docs) with commands:init,build,normalize-links,build-sidebar,build-manifest./types) and theme CSS/fonts (./theme) for library docs sitesscripts/library-templates/directory in favor of the packageWhat's included
packages/devportal-docs/with ESM TypeScript sourceTest plan
pnpm run buildcompiles cleanlypnpm test)pnpm pack+ tarball installdevportal-docs initanddevportal-docs buildwork correctly on both repos