Get all packages by running lerna ls
.
Convert this to an array
Save array as a const named all
.
Get updated package by running lerna updated
Convert this to an array
Save array as a const named updated
.
#!/bin/sh -eu | |
# code licensed under BSD 2-Clause "Simplified" License | |
# see `change-master-branch-to-main.sh --help` for usage | |
# see twitter thread for more details: https://twitter.com/EdwinKofler/status/1272729160620752898 | |
site="github.com" | |
oldDefaultBranch="master" | |
newDefaultBranch="main" |
import * as React from "react" | |
import { useState, useEffect } from "react" | |
// Hook | |
let cachedScripts = [] | |
export function useScript(src) { | |
// Keeping track of script loaded and error state | |
const [state, setState] = useState({ | |
loaded: false, |
# Extract used CSS from a page | |
# https://stackoverflow.com/a/55334749/728287 | |
# | |
# $ node extractCSS.js ~/Desktop/Coverage-20190325T110812.json | |
const fs = require('fs'); | |
let final_css_bytes = ''; | |
let total_bytes = 0; | |
let used_bytes = 0; |
const vscode = require('vscode'); | |
const shelljs = require('shelljs'); | |
// This extension is a hack to explore a possible VsCode way to search | |
// for a directory name. | |
// | |
// In IntelliJ you can search for a directory by ending the search string with '/'. | |
// In Vim, you can `:call fzf#run({'source': 'fd -t d', 'sink': 'NERDTreeFind'})` | |
// | |
// But VsCode doesn't seem to provide an API to open the current |
#!/usr/bin/env node | |
/* eslint-disable no-console */ | |
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ | |
const fs = require('fs'); | |
const path = require('path'); | |
const packagePaths = require('../peer-dependency-generator/getPackagePaths'); | |
const findAndReplace = require('../peer-dependency-generator/findAndReplace'); | |
// Generate the markdown to display peerDependencies information for each package | |
packagePaths.forEach((packagePath) => { |
Here is a checklist of all the things I need my CSS solution to handle.
I can explain any of the points. Leave a comment on the gist or tweet @DavidWells
Challenge: Take your favorite CSS solution and see how the checklist holds up.
module.exports = function(config) { | |
// Generate sourcemaps | |
config.devtool = 'source-map'; | |
// Compile i18n messages throughout the project into JSON files | |
config.module.loaders[0].query.plugins = [ | |
["react-intl", { | |
"messagesDir": "./build/messages/" | |
}] | |
]; |
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content { | |
background-color: rgba(40, 44, 52, 1) !important; | |
} | |
.tabs-container, .tab, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title { | |
background-color: rgba(40, 44, 52, 1) !important; | |
} | |
.tab.active, .tab { | |
border-right: 0px !important; |