Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Add instructions for using Emulsify with Docksal dev env #205

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,40 @@ The `start` command spins up a local server, compiles everything (runs all requi

1. `npm start` or `yarn start`

## Emulsify on the Docksal stack
### "How to" for using Emulsify with [Docksal](https://github.com/docksal/docksal) development environment

1. position yourself in the project root directory:
`cd [PROJECT_ROOT_DIR]`
2. install Emulsify theme using Docksal's Composer (Composer instance installed and configured in Docksal image): `fin exec composer require fourkitchens/emulsify`
Copy link
Member

@amazingrando amazingrando Feb 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run this command I get the following error.

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for fourkitchens/emulsify ^2.2 -> satisfiable by fourkitchens/emulsify[v2.2].
    - fourkitchens/emulsify v2.2 requires drupal/components ^1.0 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, deleting ./composer.json.

- **NOTE!!!**
It is recommended to use the _docksal/cli:2.0_ image (e.g. _docksal/cli:2.0-php7.1_).
Docksal now exposes port 3000 for NodeJS apps by default so you can use Browsersync and similar node applications directly from Docksal containers. This means that it is no longer necessary to have node.js, nvm or/and yarn installed on your local OS.
3. next, enable Emulsify and its dependencies.
Drush 8.x users should use the following command but before that, position yourself in the web root directory ("_web_" or "_docroot_" in most cases) `cd [WEB_ROOT_DIR]` or use your drush aliases:
`fin exec drush en emulsify components unified_twig_ext -y`
Drush 9.x users should use the following commands:
`fin exec drush en components unified_twig_ext -y` and
`fin exec drush theme:enable emulsify`

- optionaly, create a custom clone of Emulsify with:
`fin exec drush emulsify "YOUR_THEME"`

- **NOTE!** At the moment (emulsify 2.2) Emulsify Drush command for cloning works only with Drush 8.x.
4. next, run the following command from your theme directory (_contrib/emulsify_ or you custom clone _custom/YOUR_THEME_):
`cd contrib/emulsify`
or
`cd custom/[YOUR_THEME]`
5. if you already don't have your Github auth token globally defined you should do this now with (replace "YOUR_TOKEN" with the [token generated on your Github account](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)):
`fin exec composer config --global github-oauth.github.com YOUR_TOKEN`
- this step is **necessary**, otherwise, you'll get this error after executing command in the following step: "_Failed to clone the git<span>@</span>github&#46;com:drupal-pattern-lab/patternengine-php-twig.git repository_"
6. then run `fin exec npm install` or `fin exec yarn install` command
7. after a successful instalation you can start your Gulp tasks by runing `fin exec npm start` or `fin exec yarn start`
- there are 2 access URLs and you'll use the second one (external URL)
8. don't forget to set your theme as a default one; If you created a cloned theme, disable the original Emulsify theme `fin exec drush pmu emulsify -y` (works on Drush 8.x) or with
`fin exec drupal theme:uninstall emulsify` then enable and set to default your new theme in Drupal
(you can do that with the Drupal console command
`fin exec drupal theme:install [YOUR_THEME] --set-default` or via the Drupal UI)
---

## Highlighted Features
Expand Down