This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+frameworks/emberjs/README.org

119 lines
4.2 KiB
Org Mode
Raw Normal View History

2016-02-04 11:21:09 +00:00
#+TITLE: emberjs layer
2018-07-10 10:57:25 +00:00
#+TAGS: framework|layer|programming
2019-05-02 21:49:30 +00:00
2016-02-04 11:21:09 +00:00
[[file:img/ember.png]]
2019-05-07 20:05:06 +00:00
* Table of Contents :TOC_5_gh:noexport:
2016-02-04 11:21:09 +00:00
- [[#description][Description]]
- [[#features][Features:]]
- [[#install][Install]]
- [[#completion-system][Completion System]]
- [[#key-bindings][Key bindings]]
- [[#file-key-bindings][File key bindings]]
- [[#generator-key-bindings][Generator key bindings]]
- [[#destroy-the-inverse-of-generate-key-bindings][Destroy (the inverse of generate) key bindings]]
- [[#key-bindings-to-build-start-the-server-and-run-tests][Key bindings to build, start the server and run tests]]
* Description
This enables helpers for working with Ember.js projects.
This also includes [[https://github.com/ronco/ember-yasnippets.el][ember-yasnippets]]. See the README for ember-yansippets for the snippet keys.
To use this, you need to add add a =.dir-locals.el= file with the following in the root of your ember project:
#+BEGIN_SRC emacs-lisp
((nil . ((mode . ember))))
#+END_SRC
If you do not wish to do the following, you may also just do =M-x ember-mode=, however it will make things easier.
Additionally, temporary backup, autosave, and lockfiles interfere with broccoli watcher, so they need to either be moved out of the way or disabled.
Add the following to your =dotspacemacs/user-config=:
#+BEGIN_SRC emacs-lisp
2018-09-19 03:54:47 +00:00
(setq backup-directory-alist `((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
(setq create-lockfiles nil)
2016-02-04 11:21:09 +00:00
#+END_SRC
** Features:
2018-09-19 03:54:47 +00:00
- Ability to easily switch between various files
- Key bindings for generators and also easily revert generator actions
- Ability to build, start server, and run tests
2016-02-04 11:21:09 +00:00
* Install
To use this contribution add it to your =~/.spacemacs=
2018-09-19 03:54:47 +00:00
#+BEGIN_SRC emacs-lisp
2016-02-04 11:21:09 +00:00
(setq-default dotspacemacs-configuration-layers '(emberjs))
2018-09-19 03:54:47 +00:00
#+END_SRC
2016-02-04 11:21:09 +00:00
* Completion System
2018-09-19 03:54:47 +00:00
By default this will use =ido=,
but it may be configured to use helm by adding the following in your =dotspacemacs/user-config= function:
#+BEGIN_SRC emacs-lisp
2016-02-04 11:21:09 +00:00
(setq ember-completion-system 'helm)
2018-09-19 03:54:47 +00:00
#+END_SRC
2016-02-04 11:21:09 +00:00
* Key bindings
** File key bindings
| Key binding | Description |
|-------------+------------------------|
| SPC m f f c | ember-open-controller |
| SPC m f f m | ember-open-model |
| SPC m f f o | ember-open-router |
| SPC m f f p | ember-open-component |
| SPC m f f r | ember-open-route |
| SPC m f f j | ember-open-javascript |
| SPC m f f t | ember-open-template |
| SPC m f f x | ember-open-mixin |
| SPC m f f i | ember-open-initializer |
| SPC m f f u | ember-open-util |
| SPC m f f s | ember-open-service |
** Generator key bindings
| Key binding | Description |
|-------------+----------------------------|
| SPC m f g c | ember-generate-controller |
| SPC m f g m | ember-generate-model |
| SPC m f g o | ember-generate-router |
| SPC m f g p | ember-generate-component |
| SPC m f g r | ember-generate-route |
| SPC m f g j | ember-generate-javascript |
| SPC m f g t | ember-generate-template |
| SPC m f g x | ember-generate-mixin |
| SPC m f g i | ember-generate-initializer |
| SPC m f g u | ember-generate-util |
| SPC m f g s | ember-generate-service |
| SPC m f g g | ember-generate |
** Destroy (the inverse of generate) key bindings
| Key binding | Description |
|-------------+---------------------------|
| SPC m f d c | ember-destroy-controller |
| SPC m f d m | ember-destroy-model |
| SPC m f d o | ember-destroy-router |
| SPC m f d p | ember-destroy-component |
| SPC m f d r | ember-destroy-route |
| SPC m f d j | ember-destroy-javascript |
| SPC m f d t | ember-destroy-template |
| SPC m f d x | ember-destroy-mixin |
| SPC m f d i | ember-destroy-initializer |
| SPC m f d u | ember-destroy-util |
| SPC m f d s | ember-destroy-service |
| SPC m f d d | ember-destroy |
** Key bindings to build, start the server and run tests
| Key binding | Description |
|-------------+------------------------|
| SPC m f r b | ember-build |
| SPC m f r s | ember-serve-or-display |
| SPC m f r t | ember-test |