Is their a way to integrate Drupal-8 and React js.
I mean frontend be React js and backed be of Drupal-8.
I have gone through:
http://www.anexusit.com/blog/how-to-add-reactjs-drupal-8-composer
I have followed all the steps and done but dont know how can I use it.
Can any one please suggest some clear steps to me ..
also followed:
https://www.reddit.com/r/reactjs/comments/564gdy/react_frontend_for_your_drupal_8_backend/
In need of some clear suggestions.
Thanks in advance.
Found this article, but didn't get time to try it as I am a bit busy on another thing. Hope this will help you.
https://medium.com/#Userium/headless-drupal-build-a-drupal-8-api-with-a-reactjs-front-end-e43bf0fb94db#.2qn0u2im4
I'm currently building a module for Drupal 8 using ReactJS. I recommend you to see this: https://github.com/blackwood/drupal-react_blocks that's for Drupal 7 and then to Drupal 8 try to understand this portuguese steps: http://www.drupalbrasil.com.br/drupal-8-e-reactjs
Before starting just install libraries module to Drupal 8 and then install rest web services so after that you can copy and paste code from above to start learning how the integration works.
Using drush to install libraries and rest web services module:
drush dl libraries
drush en -y libraries
drush dl rest
drush en -y rest
I recommend you to use PHP 7 because I'm currently having troubles installing rest module for PHP 5.6.
I highly recommend you try this module (found in this repository: https://github.com/dtraft/react_quickstart ). Its built with react and can run in Drupal 8.
Add this folder in sites/all/modules/ or you can also create a subdirectory for modules you make in sites/all/modules/custom/ .
And then follow the instructions found below the repository's link or the read.md file.
Clear your site's cache in your site's Admin/Configuration/Performance/ then click Clear all cache. Save the configuration.
Then go to, Extend menu of your site search for "Decoupled Drupal with React Quickstart". Install it.
Lastly, go to Structure/Block Layout menu and add a block any part of you site and then you can choose from all existing blocks. Choose Clock Face Block.
Refresh your sites home page and there you have it!
If you want to integrate react and use inside, you can simply create a react app anywhere and when you finished just do a
npm run build
once you finished just copy the js and css file generated inside build/static folder :(js/main.something.js and css/main.something.css) to your drupal module or theme and then just reference theme in module_or_theme.libraries.yml
Related
We are working on a Magento payment module, let's call it ABC. We are using Docker for the development. So, for development, we are using a Magento image and adding the module code to the htdocs/app/code via volumes from docker-compose.yml. Our Github repo contains the module code only. We have added some tests for the module under app/code/ABC/Payment/Test folder. We want to setup a Github workflow that will run the test automatically on pull request.
The issue is some of the code depends on the Magento core classes like Magento\Framework\App\Config\ScopeConfigInterface, Magento\Store\Model\StoreManagerInterface and so on which won't be available in our Github repo. Is there any Github actions with which we can setup Magento, copy the module codes into it and run the module's tests?
Any help would be greatly appreciated. We are unable to figure this out.
You could require magento using composer within your github workflow. https://github.com/marketplace/actions/composer-php-actions
If you use grumphp (https://github.com/phpro/grumphp) you can have a look at this example: https://github.com/phpro/phpro-mage2-module-translations/blob/master/.github/workflows/grumphp.yml
You have not shared much about what precisely is making you unable to figure it out for Github Actions, however reading your question it looks to me like you already have figured out for development: Using Docker.
Now Github Actions as well supports Docker. All you need is to run the setup script for the development environment that establishes that Docker setup within the Github Action before running your tests.
You may want to add an additional environment for it, so that you can branch between the development system and Github Actions, but theoretically it should already work without.
Then after you have cloned the code, and then setup the Docker environment, execute the tests in the Github Action. The tests should run now.
According to the Getting Started guide https://docs.sylius.com/en/latest/getting-started-with-sylius/installation.html I need also to execute "yarn install", etc.
Do I really need this if I plan to use Sylius in Headless mode?
Thanks for help!
Yarn install is required for making the front end and admin panel look as you would expect, without running it all the content will render and the site will function as otherwise, however CSS and JS assets will not be served
Following this official guide and using the flex environment with php 7.2, I am trying to deploy to App Engine with custom plugins and themes.
These themes are not available on wppackagist, given that they are truly custom to my project.
My git repo is correctly saving the custom plugins and themes -- all composer.json based wppackagist plugins are being installed as intended.
However, for the life of me, I cannot get the deploy to include my custom files. I have additionally verified that the image uploaded to AE is the correct version, and it has been promoted to serve all traffic as intended.
Can anyone help me understand the logic that I am missing to ensure that when I deploy my app that the custom plugins and themes are built into the image?
So the answer is to not change the app output folder. Via the CLI install helper, I defined the output folder to wp_app -- it still anticipated app as the folder. Nothing was in the app folder when I created the service as wp_app being the WordPress folder. So, just keep the folder structure as-is and you will be fine.
I am using Silverstripe 3.0. I have added custom tabs/sub tabs for pages...if you are on a sub tab and you publish the page, the control returns to the main tab....I need the tabs preserved...
I noticed that this has been fixed in SS 3.0.5
Can someone please point out all the related files that have been modified to fix this in SS 3.0.5
Thanks in advance
seems to be related to the 3.0.1 release(http://doc.silverstripe.org/framework/en/3.1/changelogs/3.0.1) specifically this commit? (https://github.com/silverstripe/silverstripe-framework/commit/155758f) but there might be more...
But you should definitely upgrade to 3.1 (http://doc.silverstripe.org/framework/en/3.1/installation/upgrading)
Is there a reason why you dont simply upgrade?
It should be easy by just replace the cms & framework folders.
If you would like to see the changes, i recommend to checkout or download the current version of Silverstripe 3.0 in a seperate folder, make a directory diff with your project and view the diff with a diffviewer tool like:
Meld on Linux
WinMerge on Windows
FileMerge on Mac
A full list you can find here.
I need a php installation script for a Joomla (or whatever) site, like fantastico or softaculous.
The problem is, I don't need a standard installation. I want to add some extensions and add some settings to the installation.
Where can I find a good base for this?
Thanks
I think softaculous itself has custom scripts support :
http://demo.softaculous.com/index.php?act=customscripts
http://www.softaculous.com/docs/api
Softaculous also supports custom scripts support, you can try that.
Otherwise, just create a simple PHP script which just copies your Joomla script into a directory with preconfigured configuration files (Like wordpress has wp-config.php). and write a script to import database which joomla provides. This is what every Script installer does.
Let me know if you need further info.