diff --git a/README.md b/README.md index a98f2fd..6a91065 100644 --- a/README.md +++ b/README.md @@ -122,5 +122,12 @@ EOT; ``` - Note: `app.bundle.js` is client javascript code. The page is rendered fully even {$markup} is removed by client JS code. + +### VoidV8Module + +It is possible to install `VoidV8Module` to run non V8Js environment for clien side rendering only. + +```php +$this->install(new FakeV8Module(new ReduxModule($distDir, 'ssr_hello'))); +``` diff --git a/composer.json b/composer.json index d42ec64..245fde7 100644 --- a/composer.json +++ b/composer.json @@ -2,9 +2,9 @@ "name": "bear/reactjs-module", "description": "Redux React Serevr-Side Rendering using V8Js module for BEAR.Sunday", "require": { - "php": ">=7.0.0", - "bear/resource": "^1.2", - "koriym/redux-react-ssr": "^1.0.1" + "php": ">=7.1.0", + "bear/resource": "^1.4.0", + "koriym/redux-react-ssr": "^1.0.2" }, "require-dev": { "phpunit/phpunit": "^5.3" diff --git a/src/VoidV8Module.php b/src/VoidV8Module.php new file mode 100644 index 0000000..78895d2 --- /dev/null +++ b/src/VoidV8Module.php @@ -0,0 +1,26 @@ +bind(\V8Js::class)->to(VoidV8Js::class); + } +} diff --git a/tests/Fake/FakeReduxRo.html.php b/tests/Fake/FakeReduxRo.html.php index 33537a9..b4ce95e 100644 --- a/tests/Fake/FakeReduxRo.html.php +++ b/tests/Fake/FakeReduxRo.html.php @@ -16,7 +16,7 @@
-