From a174fdcf85213807e1a5b0307f19667a07b04b7c Mon Sep 17 00:00:00 2001 From: Igor Lakic Date: Mon, 26 Feb 2018 03:18:08 +0100 Subject: [PATCH 1/3] Add instructions for "How to" for using Emulsify with Docksal development environment --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 042e0dd2..1e2f3d6c 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,41 @@ 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` +- **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: +`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. then run `fin exec npm install` or `fin exec yarn install` command + - near the end, it will break ("Failed to clone the git@github.com:drupal-pattern-lab/patternengine-php-twig.git repository") and you will have to edit _scripts/pattern_lab.sh_ - change line 8 to: +`composer create-project drupal-pattern-lab/edition-twig-standard pattern-lab` + - this change removes the flag "_-n_" for a non-interactive clone. + - afterwards, run again `fin exec npm install` or `fin exec yarn install` command; Then, you'll have to provide your Github credentials, make a Github token and then copy it to your terminal to continue with the installation process. +6. 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) +7. 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` and enable and set to default your new theme in Drupal +(you can do that with the Drupal console command +`fin exec drupal theme:install emulsify --set-default` or via the Drupal UI) --- ## Highlighted Features From 03bd6d14a6dcbfe0389b480b8bc2fd84324ecef5 Mon Sep 17 00:00:00 2001 From: Igor Lakic Date: Wed, 28 Feb 2018 15:13:13 +0100 Subject: [PATCH 2/3] Add Github auth token globally --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1e2f3d6c..8d576b18 100644 --- a/README.md +++ b/README.md @@ -65,14 +65,13 @@ Drush 9.x users should use the following commands: `cd contrib/emulsify` or `cd custom/[YOUR_THEME]` -5. then run `fin exec npm install` or `fin exec yarn install` command - - near the end, it will break ("Failed to clone the git@github.com:drupal-pattern-lab/patternengine-php-twig.git repository") and you will have to edit _scripts/pattern_lab.sh_ - change line 8 to: -`composer create-project drupal-pattern-lab/edition-twig-standard pattern-lab` - - this change removes the flag "_-n_" for a non-interactive clone. - - afterwards, run again `fin exec npm install` or `fin exec yarn install` command; Then, you'll have to provide your Github credentials, make a Github token and then copy it to your terminal to continue with the installation process. -6. after a successful instalation you can start your Gulp tasks by runing `fin exec npm start` or `fin exec yarn start` +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@github.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) -7. 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 +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` and enable and set to default your new theme in Drupal (you can do that with the Drupal console command `fin exec drupal theme:install emulsify --set-default` or via the Drupal UI) From 228afb43bddfb0d65219db00acd7ec0c648cfaa8 Mon Sep 17 00:00:00 2001 From: Igor Lakic Date: Sat, 10 Mar 2018 20:40:49 +0100 Subject: [PATCH 3/3] Add small corrections --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8d576b18..692994ae 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ The `start` command spins up a local server, compiles everything (runs all requi 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: +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 @@ -72,9 +72,9 @@ or 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` and enable and set to default your new theme in Drupal +`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 emulsify --set-default` or via the Drupal UI) +`fin exec drupal theme:install [YOUR_THEME] --set-default` or via the Drupal UI) --- ## Highlighted Features