Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 92e4f1ea2d | |||
| 0062bb4506 | |||
| 5dd326be0f | |||
| bcad45d1e8 | |||
| 3daa725309 | |||
| 438619c4d9 | |||
| 1b2795fa40 | |||
| e25f1aa4f1 | |||
| d6b0ff866b |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@axe-web/block-dev-tool",
|
||||
"version": "1.0.32",
|
||||
"version": "1.0.36",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@axe-web/block-dev-tool",
|
||||
"version": "1.0.32",
|
||||
"version": "1.0.36",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@axe-web/create-block": "^1.1.30",
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "@axe-web/block-dev-tool",
|
||||
"version": "1.0.32",
|
||||
"version": "1.0.36",
|
||||
"author": {
|
||||
"name": "AXE-WEB",
|
||||
"email": "office@axe-web.com",
|
||||
"url": "https://axe-web.com/"
|
||||
},
|
||||
"scripts": {
|
||||
"info": "BLOCK_NAME=icon-text-columns MODULE_PATH= node debug.js",
|
||||
"dev": "BLOCK_NAME=icon-text-columns MODULE_PATH= node server.js",
|
||||
"build-platform": "BLOCK_NAME=icon-text-columns MODULE_PATH= node ./build.js",
|
||||
"info": "BLOCK_NAME=ebooks-resources MODULE_PATH= node debug.js",
|
||||
"dev": "BLOCK_NAME=ebooks-resources MODULE_PATH= node server.js",
|
||||
"build-platform": "BLOCK_NAME=ebooks-resources MODULE_PATH= node ./build.js",
|
||||
"dev-dev-tool": "rollup --config rollup.config.js --watch",
|
||||
"build-dev-tool": "rollup --config rollup.config.js"
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@ class <%= blockClassModel %>_Component extends \Core\Component {
|
||||
|
||||
$output = ( include( __DIR__ . '/templates/<%= blockFilename %>.template.php' ) )( $args, self::class );
|
||||
|
||||
return apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::content', $output );
|
||||
return apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::content', $output, $args );
|
||||
}
|
||||
|
||||
function register_custom_logic(): void {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>\Helpers;
|
||||
|
||||
class <%= blockClassModel %>_Elementor_Widget extends \Elementor\Widget_Base {
|
||||
use \Core\Traits\Elementor_Widget;
|
||||
|
||||
const PLUGIN_NAME = '<%= blockFilename %>';
|
||||
|
||||
public function get_name() {
|
||||
@@ -35,12 +37,8 @@ class <%= blockClassModel %>_Elementor_Widget extends \Elementor\Widget_Base {
|
||||
|
||||
$component = new \AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>\<%= blockClassModel %>_Component();
|
||||
|
||||
$args = self::prepare( $settings );
|
||||
$args = $this->prepare( $settings );
|
||||
$component->render( $args );
|
||||
}
|
||||
|
||||
public static function prepare( $args ): array {
|
||||
// Prepare $args for render function.
|
||||
return $args;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
import PluginError from 'plugin-error';
|
||||
import {Server} from "socket.io";
|
||||
import {createServer} from 'http';
|
||||
import {authtoken, connect} from "ngrok";
|
||||
// import {authtoken, connect} from "ngrok";
|
||||
import bodyParser from "body-parser";
|
||||
|
||||
/**
|
||||
@@ -569,8 +569,8 @@ async function getShareableUrl() {
|
||||
|
||||
let url;
|
||||
try {
|
||||
await authtoken(data.ngrokApiToken);
|
||||
url = await connect(port);
|
||||
// await authtoken(data.ngrokApiToken);
|
||||
// url = await connect(port);
|
||||
} catch (e) {
|
||||
console.log('Error:', `Can't connect to ngrok, probably wrong token.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user