feat: expose PROJECT_DIR global for ake files#5
Merged
Conversation
8885b2f to
00bc98d
Compare
Set a `PROJECT_DIR` global to the ake project directory (where the ake file lives) right after chdir, so scripts can reference the project root explicitly instead of relying on `process.cwd()`. Document it in the global commands doc. Co-authored-by: Cursor <cursoragent@cursor.com>
00bc98d to
91ad25f
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 7, 2026
## [8.1.0](v8.0.1...v8.1.0) (2026-06-07) ### Features * expose PROJECT_DIR global for ake files ([#5](#5)) ([ab3277b](ab3277b))
|
🎉 This PR is included in version 8.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Exposes a
PROJECT_DIRglobal for ake files, set to the project directory (where the ake file lives). ake alreadychdirs into this directory before running a command; this makes the path available explicitly so scripts can reference the project root without relying onprocess.cwd().PROJECT_DIRis assigned in#setupAke()right afterprocess.chdir(projectDir).undefinedat the top level of the ake file (read it inside a command, or lazily).globals.d.tsdeclaration and docs inAke.mdandGlobal Commands.md.Test Plan
PROJECT_DIR.PROJECT_DIRequals the project root, matchingprocess.cwd().../ake <cmd>):PROJECT_DIRstill resolves to the project root, not the subdirectory.Screenshots
Made with Cursor