Skip to content

Instantly share code, notes, and snippets.

@nvasilakis
Forked from brianloveswords/partial-package.json
Created September 19, 2017 20:33
Show Gist options
  • Save nvasilakis/ab683db961c35807ae72fe01368fb379 to your computer and use it in GitHub Desktop.
Save nvasilakis/ab683db961c35807ae72fe01368fb379 to your computer and use it in GitHub Desktop.
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