Skip to content
Snippets Groups Projects
Commit 6ab1a3c5 authored by Krzysztof Dyszczyk's avatar Krzysztof Dyszczyk
Browse files

builder

parent 6450f813
Branches
Tags
1 merge request!17Feature/loader
This commit is part of merge request !17. Comments created here will be created in the context of that merge request.
<?php
class WPDesk_Plugin_Template_Plugin extends \WPDesk\WP\Plugin\AbstractPlugin {
use WPDesk\PluginBuilder\Plugin\AbstractPlugin;
class WPDesk_Plugin_Template_Plugin extends AbstractPlugin {
/**
* WPDesk_Plugin_Template_Plugin constructor.
*
* @param WPDesk_PluginInfo $plugin_info
* @param WPDesk_Plugin_Info $plugin_info
*/
public function __construct( $plugin_info ) {
$this->plugin_namespace = 'plugin-template';
......@@ -13,6 +15,7 @@ class WPDesk_Plugin_Template_Plugin extends \WPDesk\WP\Plugin\AbstractPlugin {
}
public function init() {
die('init!');
parent::init();
}
}
\ No newline at end of file
......@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "90a6679ab444892ae83f6be609fbc970",
"content-hash": "6dffcfd3c300df555781d06c048a0bda",
"hash": "5aeeabe1688bdaf117eade0e55ba88d9",
"content-hash": "81a032366233fb16ed132d36523bb6ef",
"packages": [
{
"name": "psr/log",
......@@ -141,12 +141,12 @@
"source": {
"type": "git",
"url": "https://github.com/wpdesk/wc_helpers.git",
"reference": "eb776cd8c5173faa2d91af0dfe2b9d974ab614b9"
"reference": "4d5517340892ba6714b04b88db52a0e3bff87cea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wpdesk/wc_helpers/zipball/eb776cd8c5173faa2d91af0dfe2b9d974ab614b9",
"reference": "eb776cd8c5173faa2d91af0dfe2b9d974ab614b9",
"url": "https://api.github.com/repos/wpdesk/wc_helpers/zipball/4d5517340892ba6714b04b88db52a0e3bff87cea",
"reference": "4d5517340892ba6714b04b88db52a0e3bff87cea",
"shasum": ""
},
"require": {
......@@ -176,7 +176,7 @@
}
],
"description": "Library for developers who tries to develop WooCommerce plugins",
"time": "2018-04-14 18:40:56"
"time": "2018-04-14 21:05:56"
},
{
"name": "wpdesk/wp-autoloader",
......@@ -219,12 +219,12 @@
"source": {
"type": "git",
"url": "https://github.com/wpdesk/wp-basic-requirements.git",
"reference": "e6e260e9fdc8eba09255c8354e8b968b8e939a78"
"reference": "6495b8fd486eea26f033ebd5e2a0091a65ec901c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wpdesk/wp-basic-requirements/zipball/e6e260e9fdc8eba09255c8354e8b968b8e939a78",
"reference": "e6e260e9fdc8eba09255c8354e8b968b8e939a78",
"url": "https://api.github.com/repos/wpdesk/wp-basic-requirements/zipball/6495b8fd486eea26f033ebd5e2a0091a65ec901c",
"reference": "6495b8fd486eea26f033ebd5e2a0091a65ec901c",
"shasum": ""
},
"require": {
......@@ -246,7 +246,47 @@
"email": "krzysiek@wpdesk.pl"
}
],
"time": "2018-04-16 13:36:38"
"time": "2018-04-16 13:56:54"
},
{
"name": "wpdesk/wp-builder",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/wpdesk/wp-builder.git",
"reference": "f679cc1d1e6c994491b242f63d24193e9577ac7f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wpdesk/wp-builder/zipball/f679cc1d1e6c994491b242f63d24193e9577ac7f",
"reference": "f679cc1d1e6c994491b242f63d24193e9577ac7f",
"shasum": ""
},
"require": {
"php": ">=5.5"
},
"require-dev": {
"10up/wp_mock": "*",
"mockery/mockery": "*",
"phpunit/phpunit": "<7",
"squizlabs/php_codesniffer": "^3.0.2",
"wimg/php-compatibility": "^8",
"wp-coding-standards/wpcs": "^0.14.1"
},
"type": "library",
"autoload": {
"psr-4": {
"WPDesk\\PluginBuilder\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"authors": [
{
"name": "Krzysiek",
"email": "krzysiek@wpdesk.pl"
}
],
"time": "2018-04-16 16:24:11"
}
],
"packages-dev": [
......@@ -2051,7 +2091,8 @@
"stability-flags": {
"wpdesk/woocommerce_helpers": 20,
"wpdesk/wp-autoloader": 20,
"wpdesk/wp-basic-requirements": 20
"wpdesk/wp-basic-requirements": 20,
"wpdesk/wp-builder": 20
},
"prefer-stable": false,
"prefer-lowest": false,
......
<?php
use WPDesk\PluginBuilder\Builder\InfoBuilder;
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
......@@ -9,11 +11,5 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* Here we have loader and info about plugin we need to build.
*/
$x = new \WPDesk\Incompatible();
var_dump('plugin template have 1.1', $x->version());
/*
$builder = new WPDesk_Builder();
$builder->register_build($plugin_info, new Plugin_Build_Strategy());*/
$builder = new InfoBuilder();
$builder->build_from_info($plugin_info);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment