Created
February 25, 2016 21:29
-
-
Save drejohnson/f48f53a319cde10b9e1c to your computer and use it in GitHub Desktop.
Convert require statement to ES2015 import statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Search: | |
var\s+(\w+)\s+\=\s+require\((("|')[a-zA-Z0-9\/\.-]+\3)\)\;? | |
Replace: | |
import $1 from $2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment