Skip to content

Instantly share code, notes, and snippets.

@puredazzle
Last active December 21, 2018 06:25
Show Gist options
  • Save puredazzle/3c631af402ee9edcff89389e0904834d to your computer and use it in GitHub Desktop.
Save puredazzle/3c631af402ee9edcff89389e0904834d to your computer and use it in GitHub Desktop.
Advanced Laravel Mix setup for WordPlate - https://github.com/wordplate/wordplate
const mix = require('laravel-mix');
const resources = 'resources/assets';
const themePath = 'public/themes/wordplate';
const assetsPath = `${themePath}/assets`;
mix.setPublicPath(assetsPath);
mix.setResourceRoot('../');
mix.browserSync({
proxy: 'wordplate.dev',
files: [
`${themePath}/**/*.php`,
`${assetsPath}/**/*.js`,
`${assetsPath}/**/*.css`
]
});
mix.js(`${resources}/scripts/app.js`, `${assetsPath}/scripts`);
mix.sass(`${resources}/styles/app.scss`, `${assetsPath}/styles`, {
includePaths: ['node_modules']
});
mix.sass(`${resources}/styles/editor-style.scss`, `${assetsPath}/styles`, {
includePaths: ['node_modules']
});
mix.version();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment