Skip to content

Instantly share code, notes, and snippets.

View dfravel's full-sized avatar

Dave Fravel dfravel

  • Cape Cod, MA, United States
View GitHub Profile
@dfravel
dfravel / _shame.scss
Created March 5, 2018 14:40
Working on a custom WordPress theme for a client. Designer had created a staging site with some auto-generated css. I'm using that, the designer's PSDs (Layer 412 ... etc), some screenshots from the designer, and the client's live site to piece together this theme. _shame.scss has become the dumping ground for "I'll come back to this later"
.hidden {
display: none;
}
.clearfix {
&:before {
display: table;
content: " ";
}
&:after {
@dfravel
dfravel / webpack.mix.js
Created August 9, 2019 17:20
Laravel Mix Webpack Setup for WordPress, Sage by Roots and Tailwind
const mix = require('laravel-mix');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
require('laravel-mix-tailwind');
require('laravel-mix-purgecss');
const assetsPath = 'resources/assets';
const distPath = './dist';
const publicPath = '/wp-content/themes/THEME_NAME';
@dfravel
dfravel / package.json
Created August 9, 2019 17:21
Package.json file for WordPress, Tailwind, Roots by Sage and Font Awesome
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"