Passing variables in lua
Here is an example of passing variables in lua:
gStateMachine:change('begin-game', { level = self.level, score = self.score, matchispossible = false })
then on the receiving end in the BeginGameState.lua
function BeginGameState:enter(def) -- grab level # from the def we're passed self.level = def.level self.score = def.score
docker stuff etc
Containers
Volumes
Images
****** docker@cli:/var/www$ drush uli
http://default/user/reset/1/1562857120/4LM0dysnuYfSlI3FM4Ra3IOL6bhXs8Go…
****** fin db import bh22.sql
****** gulp in the theme directory
docker-machine ls
docker volume inspect newco_project_root
******
cd /Users/jbarnett/sys/platform/bh/newco/
fin bash and then drush cr
Twig templates, and Getting variable names from twig and printing content
Twig templates https://www.drupal.org/docs/8/theming/twig/twig-template-naming-convent…
text from content: {{ content.field_slideshow1_text1 }} kint output: {{ dump(_context|keys) }} kint output: {{ kint(items) }}
https://www.drupal.org/docs/8/theming/twig/discovering-and-inspecting-v…
Create a bootstrap subtheme in Drupal 8
composer require drupal/bootstrap
copy the THEMENAME folder in the bootstrap starterkit folder to your themes/custom directory
Change all the filenames in the newly created directory
Create a yournewthemename.info.yml file (see the attached example file)
Make sure content in webtechkitchen.libraries.yml is named with the new themename
JSX with React within a Drupal application
"Tip: To be able to use JSX you would have to use Webpack first to compile your JavaScript file and then add it to Drupal. A good approach then would be to use the create-react-app repo to start and then just copy over the resulting js file created after transpilation and embed that. You would then not need to embed react.js separately because it is already bundled in transpilation. Setting this up, however, so that auto refresh would work and the file would be copied to Drupal, is a bit more complicated and therefore we are skipping it."
directory of backups on acquia cloud for direct sftp access
/mnt/files/servername.dev/backups
Rules for Config Management in Drupal 8 to avoid config quagmire, and developer consternation
Local development process:
Pull down latest code from the “development” branch into local with "git pull"
Run "drush updb" to update the database
Run “drush config-import” to import the database ("drush cim" is the shorthand command)
Make sure you select the 'sync' directory when asked
Make local changes
Run “drush config-export” (export to “sync” directory and remember that "drush cex" is the shorthand command)
Commit the config files in the “/config/sync” directory (ONLY COMMIT CHANGES YOU MAKE*)