​Drupal Installation​
​Standalone Installation​
​PHP 7.1​
​Node (we recommend NVM)​
​Composer​
​Yarn (optional)
Require emulsify in your project composer require emulsify-ds/emulsify-drupal
Move into the contrib Emulsify theme directorycd web/themes/contrib/emulsify-drupal
Create your new custom theme by cloning emulsify php emulsify.php "THEME NAME"
(Run php emulsify.php -h
for other available options)
Move into your new custom theme directory cd ../../custom/THEME_NAME/
Install the theme dependencies yarn
or npm install
Build theme yarn build
Enable your theme and its dependencies*drush then THEME_NAME -y && drush en components emulsify_twig -y
Set your custom theme to be the default
drush config-set system.theme default THEME_NAME -y
* drush then
is the correct command for Drush versions >= 9. drush en
is the command to use for Drush versions <= 8.
Troubleshooting Installation: See Drupal Installation FAQ.
Note: Once you've created your custom theme, you can remove Emulsify as a dependency of your project. If you'd like to get updates as we push them, solely for educational/best-practice information, feel free to leave it in and receive the updates. Updating Emulsify will not affect your custom theme in any way. You should not however enable both projects - only your custom theme.
If you do decide to remove the Emulsify Drupal dependency, make sure to move the two requires from its composer.json into your project-root composer.json. (The components, and emulsify_twig modules are required for your custom theme to function, and need to be required somewhere in the composer chain.)
cd themes/contrib
(You may need to create this directory)
composer create-project emulsify-ds/emulsify-drupal --stability dev --no-interaction emulsify
Move into the emulsify theme cd emulsify
Create your new theme by cloning emulsify php emulsify.php "THEME NAME"
(Run php emulsify.php -h
for other available options)
Move into your cloned theme directory cd web/themes/custom/THEME_NAME/
Install the theme dependencies yarn
or npm install
Build Theme yarn build
Move the Emulsify Twig module from themes/custom/emulsify/vendor/drupal/emulsify_twig/
to modules/contrib/emulsify_twig
. (You can do this from the Drupal root with cp -r themes/contrib/emulsify/vendor/drupal/emulsify_twig/ modules/contrib/emulsify_twig
)
Enable Emulsify and its dependencies drush then THEME_NAME -y && drush en components emulsify_twig -y
Log in and set your custom theme to be the default
Troubleshooting Installation: See Drupal Installation FAQ.
yarn
or npm install
To create a custom clone with your project's name, you can run php emulsify.php "New Theme" --machine-name new_theme --path none
. This will create a custom version alongside your original (which can now be deleted).