-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove legacy scripts and update composer configuration
Removed deprecated batch and shell scripts, and redundant prompt documentation. Added instructor binary to composer.json and restructured namespace autoloading for better organization.
- Loading branch information
1 parent
742a973
commit 3f74074
Showing
69 changed files
with
4,841 additions
and
3,875 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Exclude unnecessary files from Composer and Git exports | ||
/docs/ export-ignore | ||
#/evals/ export-ignore # include this one with distribution | ||
#/examples/ export-ignore # include this one with distribution | ||
/notes/ export-ignore | ||
/tests/ export-ignore | ||
/.github/ export-ignore | ||
/.gitignore export-ignore | ||
/.gitattributes export-ignore | ||
/phpunit.xml export-ignore | ||
/phpstan.neon export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/psalm.xml export-ignore | ||
/composer.lock export-ignore | ||
*.md export-ignore | ||
*.mdx export-ignore | ||
|
||
# Line ending normalization | ||
# Ensure PHP, JS, and text files have consistent line endings | ||
*.php text eol=lf | ||
*.js text eol=lf | ||
*.css text eol=lf | ||
*.html text eol=lf | ||
*.txt text eol=lf | ||
*.md text eol=lf | ||
*.mdx text eol=lf | ||
*.xml text eol=lf | ||
*.yml text eol=lf | ||
*.yaml text eol=lf | ||
*.sh text eol=lf | ||
*.bat text eol=lf | ||
|
||
# Treat binary files as binary | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.pdf binary | ||
*.svg binary | ||
|
||
# Linguist overrides (optional for GitHub) | ||
*.md linguist-documentation | ||
*.json linguist-vendored | ||
/vendor/ linguist-vendored | ||
|
||
# Ignore logs and temp files in exports (optional) | ||
*.log export-ignore | ||
/tmp/ export-ignore | ||
/cache/ export-ignore | ||
*.bak export-ignore | ||
*.swp export-ignore |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,48 @@ | ||
.cache/ | ||
.idea/ | ||
# Composer dependency and autoload files | ||
composer.lock | ||
|
||
# Dependencies | ||
/vendor/ | ||
|
||
# env files | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# Logs and debug files | ||
*.log | ||
*.cache | ||
|
||
# PHP server and error logs | ||
error_log | ||
.php_error.log | ||
php_errors.log | ||
|
||
# Node modules and build artifacts (if using Node or frontend tooling) | ||
node_modules/ | ||
dist/ | ||
build/ | ||
|
||
# Python venvs | ||
.venv/ | ||
.vscode/ | ||
_docs/ | ||
|
||
# OS generated files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# IDE files | ||
/.idea/ | ||
/.vscode/ | ||
.cursorignore | ||
|
||
# PHPUnit, Pest, and other test result files | ||
.phpunit.result.cache | ||
/.phpunit.result.cache | ||
/tests/_output/ | ||
/tests/_support/_generated/ | ||
/coverage/ | ||
|
||
# User-specific files (temporary, experimental, to be archived / removed) | ||
archived/ | ||
experimental/* | ||
vendor/ | ||
.cursorignore | ||
.env | ||
composer.lock | ||
php_errors.log | ||
phpstan.neon | ||
xdebug.log | ||
tmp/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
DIR="$(dirname "$0")" | ||
SCRIPT="$1" | ||
|
||
# Sanity check | ||
if [[ "$SCRIPT" =~ \.\. ]] || [[ ! "$SCRIPT" =~ ^[a-zA-Z0-9_-]+$ ]]; then | ||
echo "Invalid script name." | ||
exit 1 | ||
fi | ||
|
||
shift | ||
php "$DIR/../scripts/$SCRIPT.php" "$@" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@echo off | ||
set DIR=%~dp0 | ||
set SCRIPT=%1 | ||
|
||
:: Sanity check | ||
echo %SCRIPT% | findstr /R /C:"\.\." /C:"[^a-zA-Z0-9_-]" >nul | ||
if %ERRORLEVEL% neq 1 ( | ||
echo Invalid script name. | ||
exit /b 1 | ||
) | ||
|
||
shift | ||
php "%DIR%..\scripts\%SCRIPT%.php" %* |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,48 @@ | ||
<?php | ||
return [ | ||
'defaultSetting' => 'twig', | ||
|
||
'settings' => [ | ||
'twig' => [ | ||
'templateType' => 'twig', | ||
'resourcePath' => '/../../../../prompts/twig', | ||
'cachePath' => '/tmp/instructor/cache/twig', | ||
'extension' => '.twig', | ||
'frontMatterTags' => ['{#---', '---#}'], | ||
'frontMatterFormat' => 'yaml', | ||
'metadata' => [ | ||
'autoReload' => true, | ||
], | ||
], | ||
'blade' => [ | ||
'templateType' => 'blade', | ||
'resourcePath' => '/../../../../prompts/blade', | ||
'cachePath' => '/tmp/instructor/cache/blade', | ||
'extension' => '.blade.php', | ||
'frontMatterTags' => ['{{--', '--}}'], | ||
'frontMatterFormat' => 'yaml', | ||
], | ||
] | ||
]; | ||
<?php | ||
return [ | ||
'defaultLibrary' => 'demo-twig', | ||
|
||
'libraries' => [ | ||
'system' => [ | ||
'templateEngine' => 'twig', | ||
'resourcePath' => '/../../../../prompts/system', | ||
'cachePath' => '/tmp/instructor/cache/system', | ||
'extension' => '.twig', | ||
'frontMatterTags' => ['{#---', '---#}'], | ||
'frontMatterFormat' => 'yaml', | ||
'metadata' => [ | ||
'autoReload' => true, | ||
], | ||
], | ||
'demo-twig' => [ | ||
'templateEngine' => 'twig', | ||
'resourcePath' => '/../../../../prompts/demo-twig', | ||
'cachePath' => '/tmp/instructor/cache/twig', | ||
'extension' => '.twig', | ||
'frontMatterTags' => ['{#---', '---#}'], | ||
'frontMatterFormat' => 'yaml', | ||
'metadata' => [ | ||
'autoReload' => true, | ||
], | ||
], | ||
'demo-blade' => [ | ||
'templateEngine' => 'blade', | ||
'resourcePath' => '/../../../../prompts/demo-blade', | ||
'cachePath' => '/tmp/instructor/cache/blade', | ||
'extension' => '.blade.php', | ||
'frontMatterTags' => ['{{--', '--}}'], | ||
'frontMatterFormat' => 'yaml', | ||
], | ||
'examples' => [ | ||
'templateEngine' => 'twig', | ||
'resourcePath' => '/../../../../prompts/examples', | ||
'cachePath' => '/tmp/instructor/cache/examples', | ||
'extension' => '.twig', | ||
'frontMatterTags' => ['{#---', '---#}'], | ||
'frontMatterFormat' => 'yaml', | ||
'metadata' => [ | ||
'autoReload' => true, | ||
], | ||
], | ||
] | ||
]; |
Oops, something went wrong.