This script can be used to generate a set of CSS variables from a Tailwind shades object.
Let's say you have the following JavaScript object. You might have generated such an object on a site such as Tailwind Shades.
{
// the plugin requires a `minimatch` dependency installed | |
// npm i -D minimatch | |
import { PluginOption } from "vite" | |
import { exec } from "child_process" | |
import minimatch from "minimatch" | |
import path from "path" | |
import chalk from "chalk" | |
export default function watch(config: { |
<?php | |
declare(strict_types=1); | |
namespace App\DataTransferObjects; | |
use Carbon\CarbonImmutable; | |
use Spatie\DataTransferObject\Caster; | |
class CarbonImmutableCaster implements Caster |
This script can be used to generate a set of CSS variables from a Tailwind shades object.
Let's say you have the following JavaScript object. You might have generated such an object on a site such as Tailwind Shades.
{
<?php | |
namespace App\Http\Client; | |
use GuzzleHttp\Promise; | |
use Illuminate\Http\Client\Events\ConnectionFailed; | |
use Illuminate\Http\Client\Events\RequestSending; | |
use Illuminate\Http\Client\Events\ResponseReceived; | |
use Illuminate\Http\Client\Request; | |
use Illuminate\Http\Client\Response; |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
// Require local folder as Composer dependency | |
// whereas _package_ is a unique package ID to keep composer from overwriting existing config | |
// | |
// from within the project folder, run the following: | |
// composer-link /path/to/package package | |
// Then run composer require as usual. | |
composer-link() { | |
composer config repositories."$2" '{"type": "path", "url": "'$1'"}' --file composer.json | |
} |
const tailwindcss = require('tailwindcss') | |
const purgecss = require('@fullhuman/postcss-purgecss') | |
const autoprefixer = require('autoprefixer') | |
const postcssImport = require('postcss-import') | |
module.exports = { | |
plugins: [ | |
postcssImport, | |
tailwindcss('./tailwind.js'), | |
purgecss({ |
trait CreatesWithLock | |
{ | |
public static function updateOrCreate(array $attributes, array $values = []) | |
{ | |
return static::advisoryLock(function () use ($attributes, $values) { | |
// emulate the code found in Illuminate\Database\Eloquent\Builder | |
return (new static)->newQuery()->updateOrCreate($attributes, $values); | |
}); | |
} |
My team found it rather hard to determine which stage to use – or whether it would be easier to stay with a certain stage and enable some features specifically.
So I ended up with a table of postcss-cssnext
features, their postcss-preset-env
counterparts (where I knew the option name) and the stage for each feature.
postcss-cssnext
features are from the feature documentation pagepostcss-preset-env
feature documentation pageHere you go:
#!/usr/bin/env ruby | |
# Input arguments | |
source_path = ARGV[0] | |
destinationPath = ARGV[1] || '~/Desktop/ember_backup' | |
# Creade destination directory if it doesn't exist | |
`mkdir -p #{destinationPath}` | |
# Find the embersnaps in the directory and count them |