-
-
Save craigrodway/50829b6ed3cb670a4e75518418b78894 to your computer and use it in GitHub Desktop.
This file contains 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
let mix = require('laravel-mix'); | |
require('laravel-mix-purgecss'); | |
function outPath(name, ext) { | |
var basePath = `public_html/site/templates/assets/${name}`; | |
return mix.inProduction() ? `${basePath}.min.${ext}` : `${basePath}.${ext}`; | |
} | |
mix.setPublicPath('public_html'); | |
mix.sass('src/scss/main.scss', outPath('main', 'css')) | |
.purgeCss({ | |
extend: { | |
content: [ | |
`public_html/site/hooks/**/*.php`, | |
`public_html/site/modules/**/*.php`, | |
`public_html/site/modules/**/*.module`, | |
`public_html/site/templates/**/*.php`, | |
], | |
safelist: { | |
standard: [ | |
// /column/, | |
/^m[a-z]-/, | |
/^p[a-z]-/, | |
/^p-/, | |
/^m-/, | |
/^up-/, | |
/^notie/, | |
/^notice/, | |
/^fa/, | |
], | |
greedy: [/column/] | |
} | |
}, | |
enabled: false, | |
}); | |
mix.js('src/js/main.js', outPath('main', 'js')); | |
mix.copyDirectory('node_modules/@fortawesome/fontawesome-free', `public_html/site/templates/resources/fa`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment