Re-enable PurgeCSS, add deploy.sh
This commit is contained in:
parent
01878fdac6
commit
d42069eb7e
21
deploy.sh
Executable file
21
deploy.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Build script for deploying on Netlify.
|
||||
#
|
||||
# "composer install" and "yarn install" are run automatically, so there's no
|
||||
# need to add them here.
|
||||
|
||||
# Run the tests to ensure that nothing is broken.
|
||||
vendor/bin/phpunit
|
||||
|
||||
# Generate the site once with no assets to that PurgeCSS has something to look
|
||||
# at.
|
||||
vendor/bin/sculpin generate -e prod
|
||||
|
||||
# Generate the front-end assets.
|
||||
yarn build
|
||||
|
||||
# Re-generate the again with the assets in the correct location.
|
||||
vendor/bin/sculpin generate -e prod
|
|
@ -13,13 +13,13 @@ mix.disableNotifications()
|
|||
.copyDirectory('assets/images', 'source/build/images')
|
||||
.copyDirectory('node_modules/font-awesome/fonts', 'source/build/fonts')
|
||||
.tailwind()
|
||||
// .purgeCss({
|
||||
// globs: [
|
||||
// path.join(__dirname, 'output_*/**/*.html'),
|
||||
// ],
|
||||
// whitelistPatterns: [/language/, /hljs/],
|
||||
// whitelistPatternsChildren: [/^markdown$/]
|
||||
// })
|
||||
.purgeCss({
|
||||
globs: [
|
||||
path.join(__dirname, 'output_*/**/*.html'),
|
||||
],
|
||||
whitelistPatterns: [/language/, /hljs/],
|
||||
whitelistPatternsChildren: [/^markdown$/]
|
||||
})
|
||||
.options({
|
||||
processCssUrls: false
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue