A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Font | |
:set guifont=Source\ Code\ Pro:h14 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason? | |
:set laststatus=0 | |
:set noshowmode "don't show --INSERT-- | |
:set noruler "don't show line numbers/column/% junk |
/** | |
* This codemod expects 2 CLI arguments: | |
* - packageDir: the path of the directory containing the package.json. It's used to detect whether a path points | |
* to a dependency or an internal module. | |
* - rootDirs: root directory paths separated by a comma if you have more than one root. | |
* Let's say that you have two files: | |
* - src/component.js | |
* - src/index.js containing the import "import Component from 'component.js';" | |
* To have the transformation successfully working you need to call jscodeshift with the "--rootDirs ./src" argument. | |
*/ |
import React from 'react' | |
import { render } from 'react-dom' | |
import { Match, Link, BrowserRouter as Router } from 'react-router' | |
import matchSorter from 'match-sorter' | |
import './styles.css' | |
const API = 'http://localhost:3000' | |
const token = localStorage.booksToken || Math.random().toString() | |
localStorage.booksToken = token |