-
Notifications
You must be signed in to change notification settings - Fork 29
Chore: Configure the composer package for publishing #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3c15015
3e7139b
2fbf960
cdc8cab
0cad3fe
a5e4bee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Automatically normalize line endings. | ||
* text=auto | ||
|
||
# Files and directories to exclude from the generated archive (export-ignore). | ||
# These will be omitted from GitHub/Packagist ZIP archives to keep packages small. | ||
|
||
# Tests and test fixtures | ||
/tests/ export-ignore | ||
|
||
# PHP unit / static analysis configs. | ||
/phpcs.xml.dist export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
|
||
# Continuous Integration configs. | ||
/.github/ export-ignore | ||
|
||
# Node and build artifacts. | ||
package.json export-ignore | ||
package-lock.json export-ignore | ||
/composer.lock export-ignore | ||
|
||
# Don't include the dotfiles for distribution. | ||
gziolo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/.* export-ignore | ||
|
||
# Mark docs as documentation for GitHub Linguist. | ||
/docs/ linguist-documentation export-ignore | ||
/CONTRIBUTING.md linguist-documentation export-ignore | ||
/LICENSE.md linguist-documentation | ||
/README.md linguist-documentation |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,44 @@ | ||
{ | ||
"name": "wordpress/abilities-api", | ||
"description": "AI Abilities for WordPress", | ||
"description": "AI Abilities for WordPress.", | ||
"license": "GPL-2.0-or-later", | ||
"type": "wordpress-plugin", | ||
"version": "0.1.0", | ||
"type": "library", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strongly disagree with this change. Nothing prevents anybody from using a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"keywords": [ | ||
"ai", | ||
"api", | ||
"llm", | ||
"abilities", | ||
"abilities-api", | ||
"wordpress" | ||
], | ||
"homepage": "https://github.com/WordPress/abilities-api/issues", | ||
"authors": [ | ||
{ | ||
"name": "WordPress AI Team", | ||
"homepage": "https://make.wordpress.org/ai/" | ||
} | ||
], | ||
"homepage": "https://github.com/WordPress/abilities-api", | ||
"support": { | ||
"issues": "https://github.com/WordPress/abilities-api/issues" | ||
"issues": "https://github.com/WordPress/abilities-api/issues", | ||
"source": "https://github.com/WordPress/abilities-api" | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"autoload": { | ||
"files": [ | ||
"includes/bootstrap.php" | ||
] | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"platform": { | ||
"php": "7.4" | ||
}, | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true, | ||
"phpstan/extension-installer": true, | ||
"composer/installers": true | ||
} | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved a few things around, so the order is similar to https://github.com/WordPress/php-ai-client/blob/trunk/composer.json. That made auditing easier for me. |
||
"platform": { | ||
"php": "7.4" | ||
}, | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* Bootstraps the Abilities API classes and global functions. | ||
* | ||
* This file is autoloaded by Composer when the package is installed via the | ||
* "files" autoload mechanism. It ensures the procedural functions defined in | ||
* `includes/abilities-api.php` are available without requiring namespaces. | ||
* | ||
* @package WordPress | ||
* @subpackage Abilities_API | ||
* @since 0.1.0 | ||
*/ | ||
|
||
declare( strict_types = 1 ); | ||
|
||
// Version of the plugin. | ||
if ( ! defined( 'WP_ABILITIES_API_VERSION' ) ) { | ||
define( 'WP_ABILITIES_API_VERSION', '0.1.0' ); | ||
} | ||
|
||
// Load core classes if they are not already defined (for non-Composer installs or direct includes). | ||
if ( ! class_exists( 'WP_Ability' ) ) { | ||
require_once __DIR__ . '/abilities-api/class-wp-ability.php'; | ||
} | ||
if ( ! class_exists( 'WP_Abilities_Registry' ) ) { | ||
require_once __DIR__ . '/abilities-api/class-wp-abilities-registry.php'; | ||
} | ||
|
||
// Ensure procedural functions are available, too. | ||
if ( ! function_exists( 'wp_register_ability' ) ) { | ||
require_once __DIR__ . '/abilities-api.php'; | ||
} | ||
|
||
// Load REST API init class for plugin bootstrap. | ||
if ( ! class_exists( 'WP_REST_Abilities_Init' ) ) { | ||
require_once __DIR__ . '/rest-api/class-wp-rest-abilities-init.php'; | ||
} |
Uh oh!
There was an error while loading. Please reload this page.