fourkitchens / emulsify

DEPRECATED (see README for new version)
GNU General Public License v2.0
162 stars 70 forks source link

`php emulsify` creates some data that is incorrect #167

Open shaal opened 7 years ago

shaal commented 7 years ago

after running drush emulsify mynewtheme comparing the original emulsify theme and the cloned theme diff -bur contrib/emulsify custom/mynewtheme

show some data that was cloned and renamed to the new theme, even when it doesn't make sense and creates unusable links (i.e. https://github.com/fourkitchens/mynewtheme)

below is the full output of that comparison -

diff -bur contrib/emulsify/components/_patterns/00-base/global/global.js custom/mynewtheme/components/_patterns/00-base/global/global.js
--- contrib/emulsify/components/_patterns/00-base/global/global.js  2017-10-24 11:39:41.044543794 -0400
+++ custom/mynewtheme/components/_patterns/00-base/global/global.js 2017-10-24 11:47:21.765649225 -0400
@@ -1,6 +1,6 @@
 // Global javascript (loaded on all pages in Pattern Lab and Drupal)
 // Should be used sparingly because javascript files can be used in components
-// See https://github.com/fourkitchens/emulsify/wiki/Drupal-Components#javascript-in-drupal for more details on using component javascript in Drupal.
+// See https://github.com/fourkitchens/mynewtheme/wiki/Drupal-Components#javascript-in-drupal for more details on using component javascript in Drupal.

 // Typekit Example
 // try {
diff -bur contrib/emulsify/components/_patterns/01-atoms/01-links/link/link.yml custom/mynewtheme/components/_patterns/01-atoms/01-links/link/link.yml
--- contrib/emulsify/components/_patterns/01-atoms/01-links/link/link.yml   2017-10-24 11:39:41.044543794 -0400
+++ custom/mynewtheme/components/_patterns/01-atoms/01-links/link/link.yml  2017-10-24 11:47:21.769649164 -0400
@@ -11,6 +11,6 @@
   href:
     "#"
 link_url:
-  https://github.com/fourkitchens/emulsify
+  https://github.com/fourkitchens/mynewtheme
 link_content:
   "This is my link text"
diff -bur contrib/emulsify/components/_patterns/01-atoms/04-images/00-image/image~logo.yml custom/mynewtheme/components/_patterns/01-atoms/04-images/00-image/image~logo.yml
--- contrib/emulsify/components/_patterns/01-atoms/04-images/00-image/image~logo.yml    2017-10-24 11:39:41.044543794 -0400
+++ custom/mynewtheme/components/_patterns/01-atoms/04-images/00-image/image~logo.yml   2017-10-24 11:47:21.769649164 -0400
@@ -3,6 +3,6 @@
 img_alt:
   'Logo'
 img_url:
-  'https://github.com/fourkitchens/emulsify'
+  'https://github.com/fourkitchens/mynewtheme'
 image_link_base_class:
   'logo'
Only in custom/mynewtheme/components/_twig-components/functions: add_attributes.function.php
Only in custom/mynewtheme/components/_twig-components/functions: bem.function.php
Only in contrib/emulsify: composer.json
Only in custom/mynewtheme: dist
Only in custom/mynewtheme: mynewtheme.breakpoints.yml
Only in custom/mynewtheme: mynewtheme.info.yml
Only in custom/mynewtheme: mynewtheme.libraries.yml
Only in custom/mynewtheme: mynewtheme.theme
Only in contrib/emulsify: emulsify.breakpoints.yml
Only in contrib/emulsify: emulsify.drush.inc
Only in contrib/emulsify: emulsify.info.yml
Only in contrib/emulsify: emulsify.libraries.yml
Only in contrib/emulsify: emulsify.theme
Only in contrib/emulsify: .git
Only in contrib/emulsify: LICENSE.txt
Only in custom/mynewtheme: node_modules
Only in custom/mynewtheme: pattern-lab
diff -bur contrib/emulsify/README.md custom/mynewtheme/README.md

--- contrib/emulsify/README.md  2017-10-24 11:39:41.044543794 -0400
+++ custom/mynewtheme/README.md 2017-10-24 11:47:21.781648984 -0400
@@ -1,6 +1,6 @@
 [![Four Kitchens](https://img.shields.io/badge/4K-Four%20Kitchens-35AA4E.svg)](https://fourkitchens.com/)

-# Emulsify: Pattern Lab + Drupal 8
+# mynewtheme: Pattern Lab + Drupal 8

 Component-driven prototyping tool using [Pattern Lab v2](http://patternlab.io/) automated via Gulp/NPM. Also serves as a starterkit Drupal 8 theme.

@@ -11,28 +11,28 @@
   3. [Composer](https://getcomposer.org/)
   4. Optional: [Yarn](https://github.com/yarnpkg/yarn)

-## Quickstart (Emulsify Standalone)
-Emulsify supports both NPM and YARN.
+## Quickstart (mynewtheme Standalone)
+mynewtheme supports both NPM and YARN.

 Install with NPM:
-`composer create-project fourkitchens/emulsify --stability dev --no-interaction emulsify && cd emulsify && npm install`
+`composer create-project fourkitchens/mynewtheme --stability dev --no-interaction mynewtheme && cd mynewtheme && npm install`

 Install with Yarn:
-`composer create-project fourkitchens/emulsify --stability dev --no-interaction emulsify && cd emulsify && yarn install`
+`composer create-project fourkitchens/mynewtheme --stability dev --no-interaction mynewtheme && cd mynewtheme && yarn install`

 ## Drupal-specific installation

 ### In a Composer-based Drupal install (recommended)

-  1. `composer require fourkitchens/emulsify`
-  2. Enable Emulsify and its dependencies `drush en emulsify components unified_twig_ext -y`
-  3. **Optional**: Create cloned theme `drush emulsify "THEME NAME"` (You may need to run `drush cc drush` to clear the drush cache. Also, you can run `drush help emulsify` for other available options)
-  4. If you created a cloned theme, `cd web/themes/custom/THEME_NAME/`. If not, `cd web/themes/contrib/emulsify/`
+  1. `composer require fourkitchens/mynewtheme`
+  2. Enable mynewtheme and its dependencies `drush en mynewtheme components unified_twig_ext -y`
+  3. **Optional**: Create cloned theme `drush mynewtheme "THEME NAME"` (You may need to run `drush cc drush` to clear the drush cache. Also, you can run `drush help mynewtheme` for other available options)
+  4. If you created a cloned theme, `cd web/themes/custom/THEME_NAME/`. If not, `cd web/themes/contrib/mynewtheme/`
   5. `npm install` or `yarn install`

-If you're not using a Composer-based Drupal install (e.g. tarball download from drupal.org) installation [instructions can be found on the Wiki](https://github.com/fourkitchens/emulsify/wiki/Installation).
+If you're not using a Composer-based Drupal install (e.g. tarball download from drupal.org) installation [instructions can be found on the Wiki](https://github.com/fourkitchens/mynewtheme/wiki/Installation).

-Troubleshooting Installation: See [Drupal Installation FAQ](https://github.com/fourkitchens/emulsify/wiki/Installation#drupal-installation-faq).
+Troubleshooting Installation: See [Drupal Installation FAQ](https://github.com/fourkitchens/mynewtheme/wiki/Installation#drupal-installation-faq).

 ## Starting Pattern Lab and watch task

@@ -45,34 +45,34 @@
 ## Highlighted Features

 <table><tbody>
-<tr><td>Lightweight</td><td>✔</td><td>Emulsify is focused on being as lightweight as possible.</td></tr>
+<tr><td>Lightweight</td><td>✔</td><td>mynewtheme is focused on being as lightweight as possible.</td></tr>
 <tr><td>SVG sprite support </td><td><strong>✔</strong></td><td>Automated support for creating SVG sprites mixins/classes.</td></tr>
 <tr><td>Stock Drupal templates </td><td><strong>✔</strong></td><td>Templates from Stable theme - see /templates directory</td></tr>
-<tr><td>Stock Components </td><td><strong>✔</strong></td><td>with Drupal support built-in (https://github.com/fourkitchens/emulsify#emulsifys-built-in-components-with-drupal-support)</td></tr>
-<tr><td>Performance Testing </td><td><strong>✔</strong></td><td>Support for testing via Google PageSpeed Insights and WebPageTest.org (https://github.com/fourkitchens/emulsify/wiki/Gulp-Config#performance-testing)</td></tr>
-<tr><td>Automated Github Deployment </td><td><strong>✔</strong></td><td>Deploy your Pattern Lab instance as a Github page (https://github.com/fourkitchens/emulsify/wiki/Gulp-Config#deployment)</td></tr>
+<tr><td>Stock Components </td><td><strong>✔</strong></td><td>with Drupal support built-in (https://github.com/fourkitchens/mynewtheme#mynewthemes-built-in-components-with-drupal-support)</td></tr>
+<tr><td>Performance Testing </td><td><strong>✔</strong></td><td>Support for testing via Google PageSpeed Insights and WebPageTest.org (https://github.com/fourkitchens/mynewtheme/wiki/Gulp-Config#performance-testing)</td></tr>
+<tr><td>Automated Github Deployment </td><td><strong>✔</strong></td><td>Deploy your Pattern Lab instance as a Github page (https://github.com/fourkitchens/mynewtheme/wiki/Gulp-Config#deployment)</td></tr>
 </tbody></table>

-<h3 id="components">Emulsify's Built in Components with Drupal support</h3>
+<h3 id="components">mynewtheme's Built in Components with Drupal support</h3>
 Forms, tables, video, accordion, cards, breadcrumbs, tabs, pager, status messages, grid

-View a [demo of these default Emulsify components](https://fourkitchens.github.io/emulsify/pattern-lab/public/).
+View a [demo of these default mynewtheme components](https://fourkitchens.github.io/mynewtheme/pattern-lab/public/).

 ## Documentation
-Documentation is currently provided in [the Wiki](https://github.com/fourkitchens/emulsify/wiki). Here are a few basic links:
+Documentation is currently provided in [the Wiki](https://github.com/fourkitchens/mynewtheme/wiki). Here are a few basic links:

 #### General Orientation

-See [Orientation](https://github.com/fourkitchens/emulsify/wiki/Orientation)
+See [Orientation](https://github.com/fourkitchens/mynewtheme/wiki/Orientation)

 #### For Designers (Prototyping)

-See [Designers](https://github.com/fourkitchens/emulsify/wiki/For-Designers)
+See [Designers](https://github.com/fourkitchens/mynewtheme/wiki/For-Designers)

 #### For Drupal 8 Developers

-See [Drupal Usage](https://github.com/fourkitchens/emulsify/wiki/Drupal-Usage)
+See [Drupal Usage](https://github.com/fourkitchens/mynewtheme/wiki/Drupal-Usage)

 #### Gulp Configuration

-See [Gulp Config](https://github.com/fourkitchens/emulsify/wiki/Gulp-Config)
+See [Gulp Config](https://github.com/fourkitchens/mynewtheme/wiki/Gulp-Config)
diff -bur contrib/emulsify/templates/navigation/menu--main.html.twig custom/mynewtheme/templates/navigation/menu--main.html.twig
--- contrib/emulsify/templates/navigation/menu--main.html.twig  2017-10-24 11:39:41.064545924 -0400
+++ custom/mynewtheme/templates/navigation/menu--main.html.twig 2017-10-24 11:47:21.777649044 -0400
@@ -18,5 +18,5 @@
  *   - in_active_trail: TRUE if the link is in the active trail.
  */
 #}
-{{ attach_library('emulsify/main_menu') }}
+{{ attach_library('mynewtheme/main_menu') }}
 {% include "@molecules/menus/main-menu/main-menu.twig" %}
ccjjmartin commented 7 years ago

@shaal Do you think it would be better to leave the phrase "emulsify" in some of these files rather than replace it (currently the drush script is an all or nothing within each file)?

We had considered making templates for these files so that exact lines could be replaced but would also need to setup some sort of build system so that the example theme would continue to work. It would also mean that contributors would need to make changes to the template files instead of the "built" files which might make it more complicated to maintain down the road. I would love to hear your ideas on this subject.

ModulesUnraveled commented 7 years ago

Yeah, I can see what you’re talking about. We might not want to replace within documentation files, etc. This is a really useful comparison. I’ll take a more thorough look when I have a minute

evanmwillhite commented 6 years ago

Is this still an issue since moving to the php script?

ccjjmartin commented 6 years ago

Yes, this is really a larger issue of needing template files.