-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blocks: introduce new package for block management (#17100)
See #17099
- Loading branch information
Showing
6 changed files
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Files not needed to be distributed in the package. | ||
.gitattributes export-ignore | ||
phpunit.xml.dist export-ignore | ||
tests/ 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vendor | ||
wordpress | ||
composer.lock |
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,22 @@ | ||
# Jetpack Blocks | ||
|
||
Register and manage blocks within a plugin. Used to manage block registration, enqueues, and more. | ||
|
||
## Usage | ||
|
||
## Development | ||
|
||
Running tests requires working `svn`, `composer` and `yarn` commands. | ||
|
||
Once these are installed, you install the composer dependencies by running: | ||
|
||
```bash | ||
$ composer install --ignore-platform-reqs | ||
``` | ||
|
||
### Run PHP unit tests | ||
|
||
On a local development environment run: | ||
```bash | ||
$ composer phpunit | ||
``` |
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,31 @@ | ||
{ | ||
"name": "automattic/jetpack-blocks", | ||
"description": "Register and manage blocks within a plugin. Used to manage block registration, enqueues, and more.", | ||
"type": "library", | ||
"license": "GPL-2.0-or-later", | ||
"require": {}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^5.7 || ^6.5 || ^7.5", | ||
"automattic/wordbless": "dev-master" | ||
}, | ||
"autoload": { | ||
"classmap": [ | ||
"src/" | ||
] | ||
}, | ||
"scripts": { | ||
"phpunit": [ | ||
"@composer install", | ||
"./vendor/phpunit/phpunit/phpunit --colors=always" | ||
], | ||
"post-update-cmd": "php -r \"copy('vendor/automattic/wordbless/src/dbless-wpdb.php', 'wordpress/wp-content/db.php');\"" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "../*" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
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,7 @@ | ||
<phpunit bootstrap="tests/php/bootstrap.php" backupGlobals="false" colors="true"> | ||
<testsuites> | ||
<testsuite name="main"> | ||
<directory prefix="test" suffix=".php">tests/php</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
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,23 @@ | ||
<?php | ||
/** Blocks package. | ||
* | ||
* @since 9.0.0 | ||
* | ||
* This package lifts elements from Jetpack's Jetpack_Gutenberg class. | ||
* It is now an standalone package reusable outside Jetpack. | ||
* | ||
* @package automattic/jetpack-blocks | ||
*/ | ||
|
||
namespace Automattic\Jetpack; | ||
|
||
/** | ||
* Register and manage blocks within a plugin. Used to manage block registration, enqueues, and more. | ||
* | ||
* @since 9.0.0 | ||
*/ | ||
class Blocks { | ||
|
||
} | ||
|
||
|