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

Install Babel Minify, add to presets #67

Merged
merged 1 commit into from
May 8, 2018
Merged

Conversation

evanmwillhite
Copy link
Contributor

@evanmwillhite evanmwillhite commented Oct 19, 2017

Adds JS minification using https://github.com/babel/minify. Solves #63

To test:

  • Clone a fresh copy of Emulsify
  • composer install
  • Change line 6 in package.json to "emulsify-gulp": "fourkitchens/emulsify-gulp#babel-minify",
  • yarn install
  • yarn start
  • Verify start command runs without errors
  • Verify Pattern Lab components with JavaScript work OK
  • Verify dist JS is minified. The file here dist/02-molecules/menus/main-menu/main-menu.js should look like code below:
'use strict';(function(){'use strict';var a=document.getElementById('toggle-expand'),b=document.getElementById('main-nav'),c=b.getElementsByClassName('expand-sub');console.log(a),a.addEventListener('click',function(){a.classList.toggle('toggle-expand--open'),b.classList.toggle('main-nav--open')});for(var d=0;d<c.length;d++)c[d].addEventListener('click',function(a){var b=a.currentTarget,c=b.nextElementSibling;b.classList.toggle('expand-sub--open'),c.classList.toggle('main-menu--sub-open')})})();
//# sourceMappingURL=main-menu.js.map

@evanmwillhite evanmwillhite merged commit 43c1034 into develop May 8, 2018
@evanmwillhite evanmwillhite deleted the babel-minify branch May 8, 2018 14:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants