Skip to content

Instantly share code, notes, and snippets.

View kellymears's full-sized avatar

Kelly Mears kellymears

View GitHub Profile
@kellymears
kellymears / webpack.mix.js
Created January 20, 2019 20:08
[Gutenberg Webpack Mix] #gutenberg #mix #js
const mix = require('laravel-mix');
const url = 'http://lab.tinypixel.test';
const app = './src';
const config = './config';
const resources = './resources';
const assets = './resources/assets';
const dist = './dist';
const externals = {
# Finder: show full path in title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: allow text selection in Quick Look
@kellymears
kellymears / .stylelintrc.cjs
Last active May 16, 2023 08:25
sage bootstrap
module.exports = {
extends: ['@roots/bud-sass/config/stylelint'],
rules: {
'import-notation': null,
'no-empty-source': null,
},
};
/** @wordpress */
import {__} from '@wordpress/i18n'
import {RichText} from '@wordpress/block-editor'
/** Modules */
import PropTypes from 'prop-types'
/** Components */
import Buttons from '@blocks/ndn-page-header/components/Buttons'
@kellymears
kellymears / .pnpmfile.cjs
Created April 12, 2023 15:42
bud.js pnpm compatibility shim
const { dependencies, devDependencies } = require(`./package.json`);
/**
* bud.js pnpm compatibility shim
*
* pnpm allows customizing the package installation process through special functions called hooks.
* These hooks can be defined in a .pnpmfile.cjs file, which should be located in the same directory
* as the lockfile. For example, in a monorepo with a shared lockfile, the .pnpmfile.cjs file should
* be placed in the root of the monorepo.
*
const value = () => {
console.log('gist import works');
}
export default value
/**
* build.module.rules.after
*/
module.exports = async (config) =>
config
/**
* .mjs handling
*/
.hooks.on('build.module.rules.after', (rules) => [
...rules,
<?php
/**
* Plugin Name: Tiny Blocks
* Description: Backbone for modular block building
* Version: 0.1.0
* Author: Kelly Mears, Tiny Pixel
* Author URI: https://tinypixel.dev
* License: MIT
* Text Domain: tinyblocks
*
import {globby} from '@roots/bud-support'
import {readFile, readJsonSync} from 'fs-extra'
import {join} from 'path'
describe('repo', function () {
describe('publish check: */lib/cjs/index.js', () => {
globby
.globbySync('packages/@roots/*', {
absolute: true,
onlyDirectories: true,