Created
April 14, 2017 22:32
-
-
Save tlrobinson/41bbe51c77b4f3f0b185a163a90ed608 to your computer and use it in GitHub Desktop.
metabase redux cleanup regexes
This file contains 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
String literal action names in action creator: | |
Find: (export\s+const\s+\w+\s*=\s*create(?:Thunk)?Action)\("([^"]+)" | |
Replace: export const $2 = "$2";\n$1($2 | |
Un-namespaced action constants: | |
Find: export\s+const\s+(\w+)\s*=\s*["']([A-Z_]+)["'] | |
Replace: export const $1 = "metabase/NAMESPACE/$2" | |
String literal action names in reducer: | |
Find: \[["']([A-Z_]+)["']\]\s*: | |
Replace: [$1]: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment