Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pesterhazy
Created October 16, 2016 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pesterhazy/024fee64e05a28e1f1b9ff602d09f784 to your computer and use it in GitHub Desktop.
Save pesterhazy/024fee64e05a28e1f1b9ff602d09f784 to your computer and use it in GitHub Desktop.
patch jsbundle to set __DEV__ to false for a bundle built with `--dev true`
#!/usr/bin/env python
# Patch jsbundle to set __DEV__ to false
import sys, re
print(re.sub(r'__DEV__\s*=\s*true;', "__DEV__=false;",
sys.stdin.read()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment