Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TypeScript autobuild and copy to clipboard. Useful for developing stuff where you can't actually access the content directly in a text editor (e.g. tampermonkey)
"scripts": {
"build": "tsc && npm run post-build",
"watch": "tsc-watch --onSuccess 'npm run post-build'",
"post-build": "rollup build/index.js --o build/bundle.js --f iife && cat src/prelude.js build/bundle.js | (pbcopy && osascript -e 'display notification \"Script copied to clipboard\" with title \"Script Builder\"' || echo 'copied script to clipboard')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment