var elixir = require('laravel-elixir');
elixir.config.sourcemaps = false;

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

// Run "gulp" to merge scss/js files
elixir(function (mix) {

    var npmDir = 'node_modules/',
        jsDir = 'resources/assets/js/';

    mix.copy(npmDir + 'vue/dist/vue.min.js', jsDir);
    mix.copy(npmDir + 'vue-resource/dist/vue-resource.min.js', jsDir);

    mix.scripts([
        'vue.min.js',
        'vue-resource.min.js'
    ], 'public/js/vendor.js');

    // Merge app.scss and all includes to one style file
    mix.sass('app.scss', 'public/styles/styles.css');
});
