From 3d256c6b3b593c216cab44f25075810d9767e5b0 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 29 May 2018 16:22:06 -0400 Subject: [PATCH] Support additional JS snippets Because React + Redux + Flow = SO MUCH BOILERPLATE... --- emacs.d/snippets/rjsx-mode/action-extractor | 5 +++++ emacs.d/snippets/rjsx-mode/redux-action | 5 +++++ emacs.d/snippets/rjsx-mode/typed-redux-action | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 emacs.d/snippets/rjsx-mode/action-extractor create mode 100644 emacs.d/snippets/rjsx-mode/redux-action create mode 100644 emacs.d/snippets/rjsx-mode/typed-redux-action diff --git a/emacs.d/snippets/rjsx-mode/action-extractor b/emacs.d/snippets/rjsx-mode/action-extractor new file mode 100644 index 000000000..62834a29a --- /dev/null +++ b/emacs.d/snippets/rjsx-mode/action-extractor @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: exactness +# key: $x +# -- +$Exact<$Call> \ 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 000000000..d196f8ee8 --- /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 000000000..a4ef0181c --- /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