Skip to content

Snippets

Tomer Lichtash edited this page Dec 5, 2022 · 3 revisions

tryRealpath.js

// substitute in node_modules\jest-util\build\tryRealpath.js

function tryRealpath(path) {
	try {
		if (path && /[\\\/]temp/i.test) {
			return path;
		}
		path = _gracefulFs().realpathSync.native(path);
	} catch (error) {
		if (error.code !== 'ENOENT') {
			throw error;
		}
	}
}

touch-css.sh

#!/usr/bin/bash
CSS_SRC=src/components/layout/layout.st.css
cp -f $CSS_SRC /tmp
echo "" >> $CSS_SRC
echo '.dummy { color: red; }' >> $CSS_SRC
sleep 2
cp -f /tmp/layout.st.css $CSS_SRC
echo "Touched $CSS_SRC"
Clone this wiki locally