Last active
June 16, 2019 20:55
-
-
Save johnregalado/2ac11eb09612f394b70d405b49ee955b to your computer and use it in GitHub Desktop.
Laravel 5.2 Elixir with Foundation Sites & Font Awesome JS Babel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import 'foundation'; | |
@include foundation-everything; | |
// Font Awesome | |
@import "../../../node_modules/font-awesome/scss/font-awesome"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elixir = require('laravel-elixir'); | |
elixir(function(mix) { | |
// Options | |
var options = { | |
includePaths: [ | |
'node_modules/foundation-sites/scss', | |
'node_modules/motion-ui/src' | |
] | |
}; | |
// Sass | |
mix.sass('app.scss', 'public/css/foundation.min.css', options); | |
// Javascript | |
var jQuery = '../../../node_modules/jquery/dist/jquery.js'; | |
var whatInput = '../../../node_modules/what-input/what-input.js' | |
var foundationJsFolder = '../../../node_modules/foundation-sites/js/'; | |
mix.scripts(jQuery, 'public/js/jquery.js'); | |
mix.scripts(whatInput, 'public/js/why-input.js'); | |
mix.babel([ | |
foundationJsFolder + 'foundation.core.js', | |
// Optional Components | |
foundationJsFolder + 'foundation.util.mediaQuery.js', | |
foundationJsFolder + 'foundation.util.*.js', | |
foundationJsFolder + 'foundation.tabs.js', | |
foundationJsFolder + 'foundation.abide.js', | |
foundationJsFolder + 'foundation.accordion.js', | |
foundationJsFolder + 'foundation.accordionMenu.js', | |
foundationJsFolder + 'foundation.drilldown.js', | |
foundationJsFolder + 'foundation.dropdown.js', | |
foundationJsFolder + 'foundation.dropdownMenu.js', | |
foundationJsFolder + 'foundation.equalizer.js', | |
foundationJsFolder + 'foundation.interchange.js', | |
foundationJsFolder + 'foundation.magellan.js', | |
foundationJsFolder + 'foundation.offcanvas.js', | |
foundationJsFolder + 'foundation.orbit.js', | |
foundationJsFolder + 'foundation.responsiveMenu.js', | |
foundationJsFolder + 'foundation.responsiveToggle.js', | |
foundationJsFolder + 'foundation.reveal.js', | |
foundationJsFolder + 'foundation.slider.js', | |
foundationJsFolder + 'foundation.sticky.js', | |
foundationJsFolder + 'foundation.toggler.js', | |
foundationJsFolder + 'foundation.tooltip.js', | |
// This file initializes foundation | |
'start_foundation.js' | |
], 'public/js/foundation.min.js'); | |
// Version Files | |
mix.version([ | |
'public/css/foundation.min.css', | |
'public/js/foundation.min.js' | |
]); | |
// Font Awesome | |
mix.copy('node_modules/font-awesome/fonts', 'public/build/fonts') | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install jquery --save | |
npm install foundation-sites --save | |
npm install motion-ui --save | |
npm install font-awesome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).foundation(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment