Skip to content

Commit

Permalink
updated to include options and clearer layout
Browse files Browse the repository at this point in the history
  • Loading branch information
mediabeastnz authored Jun 13, 2017
1 parent 5656d8a commit 32802c7
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions webpack.mix.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,35 @@ const { mix } = require('laravel-mix');
/*-------------------------------------------------------------------
Tasks
-------------------------------------------------------------------*/

// javascript
mix.js('themes/base/js/app.js', 'themes/base/js/app.min.js');
mix.autoload({
'jquery': ['$', 'jQuery', 'window.jQuery'],
'axios': ['window.axios']
})
.js('themes/base/js/app.js', 'themes/base/js/app.min.js').sourceMaps()
.sass('themes/base/scss/app.scss', 'themes/base/css/').options({
processCssUrls: false
})
.sass('themes/base/scss/editor.scss', 'themes/base/css/');

// BrowserSync - e.g. "localhost/mysite.com"
});
mix.extract(['jquery']);
// scss
mix.sass('themes/base/scss/app.scss', 'themes/base/css/');
mix.sass('themes/base/scss/editor.scss', 'themes/base/css/');
// generate sourcemaps
mix.sourceMaps();
// mix options
mix.options({
processCssUrls: false,
//purifyCss: {
// paths: glob.sync([
// path.join(__dirname, 'themes/base/templates/**/*.ss')
// ]),
// minimize: true
//},
purifyCss: false,
postCss: [require('autoprefixer')],
clearConsole: true
});
// BrowserSync
mix.browserSync({
proxy: 'localhost/[YOURSITENAME.CO.NZ]',
files: ["themes/base/css/*", "themes/base/js/app.min.js", "themes/base/templates/*.ss", "themes/base/templates/*/*.ss"]
files: ["themes/base/css/*", "themes/base/js/app.min.js", "themes/base/templates/**/*.ss"]
});

0 comments on commit 32802c7

Please sign in to comment.