{"size": 1749, "ext": "js", "max_stars_repo_path": "webpack.mix.js", "max_stars_repo_name": "chrisboakes/payment-request-api", "max_stars_repo_stars_event_min_datetime": "2017-10-23T11:46:27.000Z", "max_stars_repo_stars_event_max_datetime": "2017-10-23T11:46:27.000Z", "max_issues_repo_path": "webpack.mix.js", "max_issues_repo_name": "chrisboakes/payment-request-api", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "webpack.mix.js", "max_forks_repo_name": "chrisboakes/payment-request-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.5925925926, "max_line_length": 76, "alphanum_fraction": 0.5071469411}
/*
 |--------------------------------------------------------------------------
 | Laravel Mix Config File
 |--------------------------------------------------------------------------
 |
 | Larvel mix is used as a build tool create all front end assets including
 | SCSS, JS, SVG Sprite and browsersync.
 |
 */

// Dependencies
const mix = require('laravel-mix');

// .env Variables
const src = 'src';
const root = './';
const host = '192.168.70.90';

// Assets Path
const jsSrcPath = `${src}/js/app.js`;
const scssSrcPath = `${src}/scss/style.scss`;
const devPath = `${root}/public/assets`;
const productionPath = `./lib`;

mix.setPublicPath(root);

let destPath = mix.config.production ? productionPath : devPath;

// Styles
mix.sass(scssSrcPath, destPath)
    .options({
        processCssUrls: false
    });

// Js
mix.js(jsSrcPath, destPath);

// SVG Sprite
mix.webpackConfig({
    module: {
        rules: [
            {
                test: /(\.vue|\.js)$/,
                loader: 'babel-loader',
                exclude: /node_modules/
            },
            {
                test: /(\.vue|\.js)$/,
                loader: 'eslint-loader',
                exclude: /node_modules/
            }
        ]
    }
});

// Versioning and Sourcemaps
if (mix.config.production) {
    // Enable cache busting in production
    mix.version();

    // Code Splitting Example - More info on this in the README.md file
    // mix.extract(['vue']);
} else {
    // Enable sourcemap for development
    mix.sourceMaps();
}


// Browser Sync

if (!mix.config.hmr) {
    mix.browserSync({
        proxy: host,
        browser: 'google chrome',
        files: [
            `public/assets/*.css`,
            `public/assets/*.js`
        ]
    });
}
