Last active
December 17, 2015 04:57
-
-
Save milose/9bfc5f95895466cb30b5 to your computer and use it in GitHub Desktop.
Laravel gulpfile.js with Foundation
This file contains hidden or 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
// load elixir and .env reader | |
var elixir = require('laravel-elixir'), | |
env = require('dotenv').load(); | |
// plug-ins | |
require('laravel-elixir-vueify'); | |
// paths | |
var path = { | |
node: 'node_modules/', | |
foundation: 'foundation-sites/', | |
motionui: 'motion-ui/', | |
}; | |
// config | |
elixir.config.sourcemaps = process.env.APP_DEBUG; | |
elixir(function(mix) { | |
// browserSync starter. Start with by running: | |
// gulp && gulp watch | php artisan serve --host=0.0.0.0 | |
mix.browserSync({ | |
proxy: 'localhost:8000', | |
notify: false | |
}); | |
// sass | |
mix.sass('app.scss', null, { | |
includePaths: [ | |
elixir.config.assetsPath + '/sass', | |
path.node + path.foundation + '/scss', | |
path.node + path.motionui + '/src', | |
] | |
}); | |
// Main app js file | |
// app.js | |
mix.browserify('app.js'); | |
// Scripts to combine and load on top | |
// top.js | |
mix.scripts([ | |
'top', | |
], 'public/js/top.js'); | |
// Vendor scripts to combine and load at the end of <body> | |
// vendor.js | |
mix.scripts([ | |
// general | |
path.node + '/jquery/dist/jquery.js', | |
path.node + '/underscore/underscore.js', | |
path.node + '/what-input/what-input.js', | |
// Foundation 6 components. Load the ones you need. | |
// foundation core | |
path.node + path.foundation + '/js/foundation.core.js', | |
// foundation plug-ins | |
path.node + path.foundation + '/js/foundation.util.box.js', | |
path.node + path.foundation + '/js/foundation.util.nest.js', | |
path.node + path.foundation + '/js/foundation.util.mediaQuery.js', | |
path.node + path.foundation + '/js/foundation.util.motion.js', | |
path.node + path.foundation + '/js/foundation.util.keyboard.js', | |
path.node + path.foundation + '/js/foundation.util.triggers.js', | |
path.node + path.foundation + '/js/foundation.abide.js', | |
path.node + path.foundation + '/js/foundation.dropdownMenu.js', | |
path.node + path.foundation + '/js/foundation.responsiveMenu.js', | |
path.node + path.foundation + '/js/foundation.responsiveToggle.js', | |
path.node + path.foundation + '/js/foundation.toggler.js', | |
path.node + path.motionui + '/dist/motion-ui.js', | |
], 'public/js/vendor.js', './'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment