about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2018-05-29T20·22-0400
committerWilliam Carroll <wpcarro@gmail.com>2018-07-19T16·00-0400
commit3d256c6b3b593c216cab44f25075810d9767e5b0 (patch)
treefcb916d2180ece35f3361da82257f934fda5c93a
parentfc283b7a23bdcdc7d908172632f292b494072f34 (diff)
Support additional JS snippets
Because React + Redux + Flow = SO MUCH BOILERPLATE...
-rw-r--r--emacs.d/snippets/rjsx-mode/action-extractor5
-rw-r--r--emacs.d/snippets/rjsx-mode/redux-action5
-rw-r--r--emacs.d/snippets/rjsx-mode/typed-redux-action5
3 files changed, 15 insertions, 0 deletions
diff --git a/emacs.d/snippets/rjsx-mode/action-extractor b/emacs.d/snippets/rjsx-mode/action-extractor
new file mode 100644
index 000000000000..62834a29ab04
--- /dev/null
+++ b/emacs.d/snippets/rjsx-mode/action-extractor
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: exactness
+# key: $x
+# --
+$Exact<$Call<typeof $1>>
\ No newline at end of file
diff --git a/emacs.d/snippets/rjsx-mode/redux-action b/emacs.d/snippets/rjsx-mode/redux-action
new file mode 100644
index 000000000000..d196f8ee809f
--- /dev/null
+++ b/emacs.d/snippets/rjsx-mode/redux-action
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: redux-action
+# key: rax
+# --
+export const ${1:$$(lower->caps yas-text)} = '`(downcase (buffer-dirname))`/${1:$(caps->kebab yas-text)}'
\ No newline at end of file
diff --git a/emacs.d/snippets/rjsx-mode/typed-redux-action b/emacs.d/snippets/rjsx-mode/typed-redux-action
new file mode 100644
index 000000000000..a4ef0181cd4e
--- /dev/null
+++ b/emacs.d/snippets/rjsx-mode/typed-redux-action
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: typed-redux-action
+# key: trax
+# --
+export const ${1:$$(lower->caps yas-text)}: '`(downcase (buffer-dirname))`/${1:$(caps->kebab yas-text)}' = '`(downcase (buffer-dirname))`/${1:$(caps->kebab yas-text)}'
\ No newline at end of file