Git Product home page Git Product logo

atom-ember-cli-helper's Introduction

Ember CLI Helper

Gitter chat

ember-cli integration in Atom. Currently maintained by @lamabiker, previously maintained by @mariusandra, originally created by @alexlafroscia. Development originally sponsored by Apprentus.

Feel free to open issues if you find something. Pull requests are more than welcome!

Keyboard shortcuts

Keybinding Action
ctrl+alt+e Toggle between the component/controller and the template
ctrl+alt+s Toggle between the component and the styles/component.sass file
ctrl+alt+a     Opens all .hbs files where the current component is called        
ctrl+alt+r Toggle between the controller and the route
ctrl+alt+enter Jump into templates. Press when cursor over {{forms/super-select ...}} to open templates/components/forms/super-select.hbs

Commands

Command Description
Server Runs ember server in the root folder of the project.
Test Runs ember test in the root folder of the project
Generate Opens the panel to run a generator
Exit Stops a currently running process
Minimize Show and hide the output panel, without hiding everything else
Close Hide the entire panel

Generators

Running the generators through Atom is really easy. When you first open the panel, it will bring up a list of file types to generate. This list is based on the output of ember g --help, and therefore should include all future blueprints as well as those added by addons automatically. Once you select a type, you'll be prompted to enter a name, and the output will appear in orange in the bottom panel.

Help! It's broken!

That might be the case! But first, check if specifying the path to the Ember and NPM packages fixes your problems. It probably, hopefully will. If it doesn't, please file an issue so I can try fixing it!

Known limitation: make sure your ember project is the first project (first in the list) opened in Atom.

Settings

Setting Purpose Default Value
Generate Coffeescript Have all of the generators make CoffeeScript files instead of Javascript false
Path To Ember Executable Point the CLI helper to the Ember executable on your computer /usr/local/bin/ember
Path To node Executable Point the CLI helper to the node executable on your computer /usr/local/bin/node

Todo List | Pipeline

  • Add a 'cleaner' tool that scans for unused components
  • Open ember-cli-helper automatically if the package uses the Ember CLI
  • Differentiate a task's button from the others when it is active
  • Use the editor's theme to get colours for success and error in the command output
  • Give some sort of visual feedback about the running command when the panel is minimized
  • Include a panel for running the file generators
  • Add convenience shortcuts to switch between component and template (and route and ...)
  • Add option to enter components when clicking something over {{forms/super-select ... }} --> opens components/forms/super-select.js

Troubleshooting

Some users have experienced problems running the commands when they opening their project through the File > Open menu. If this happens to you, try opening the project from the command line with the atom command see if that fixes the issue.

If the generators button doesn't work, ember-cli-helper probably can't find your ember project. Double check all the paths and make sure your ember project is the first opened project.


Very special thanks to @alexlafroscia for creating the original atom plugin and to @mariusandra maintaining it!

Special thanks to @nickclaw and his atom-grunt-runner package, which was @alexlafroscia's inspiration for building this and a big help in putting it together.

atom-ember-cli-helper's People

Contributors

alexlafroscia avatar caseywatts avatar mariusandra avatar matthewdias avatar nathanielw avatar xaseracheron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

atom-ember-cli-helper's Issues

Windows Support

Hey,

Unless I'm missing something, no matter what I've tried, I keep getting "is not recognized as an internal or external command" error when I try to run the "Server" or "Test" or any other function.
I tried any path I could think of and none worked.

Can you please describe the default configuration for Windows?

Thanks,
Dan

Unable to start server

While using a simple "foo" project (built with ember cli, i.e. using terminal command), i was not able to start the server.

Having the following error :

'Uncaught Error: spawn ENOENT '

See screenshot 👍
capture decran 2014-05-11 a 12 58 19

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:53:11)
EmberCliHelperView.initialize (/Users/jmp/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:22:9)

Uncaught TypeError: Cannot read property 'show' of undefined

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.188.0
System: Mac OS X 10.10.2
Thrown From: ember-cli-helper package, v0.7.2

Stack Trace

Uncaught TypeError: Cannot read property 'show' of undefined

At /Users/robert/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:125

TypeError: Cannot read property 'show' of undefined
    at EmberCliHelperView.module.exports.EmberCliHelperView.showGeneratorList (/Users/robert/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:219:28)
    at HTMLButtonElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:4430:9)
    at HTMLButtonElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:4116:28)

Commands

  2x -0:24.7 ember-cli-helper:toggle (atom-pane.pane.active)
     -0:21.8 application:new-file (atom-pane.pane.active)
  2x -0:20.2 core:backspace (atom-text-editor.editor)
     -0:19.7 ember-cli-helper:toggle (atom-text-editor.editor)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "ember-cli-helper": {}
}

Installed Packages

# User
ember-cli-helper, v0.7.2
html-helper, v0.2.3

# Dev
No dev packages

Cannot jump into templates

Steps to reproduce:

  1. Position cursor on name of an Ember template.
  2. CTRL + ALT + Enter
  3. Uncaught error as detailed below.

Atom: 1.19.7 ia32
Electron: 1.6.9
OS: Microsoft Windows 7 Professional
Thrown From: ember-cli-helper package 0.9.0

Stack Trace

Uncaught TypeError: Cannot read property '18' of undefined

At /C:/Users/user/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:247

TypeError: Cannot read property '18' of undefined
    at EmberCliHelperView.module.exports.EmberCliHelperView.openComponent (/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:177:32)
    at /packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:31:46)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.19.7/resources/app/src/command-registry.js:265:35)
    at ~/AppData/Local/atom/app-1.19.7/resources/app/src/command-registry.js:3:65
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (~/AppData/Local/atom/app-1.19.7/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:22)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.19.7/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:28)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.19.7/resources/app/src/window-event-handler.js:100:42)
    at HTMLDocument.<anonymous> (~/AppData/Local/atom/app-1.19.7/resources/app/src/window-event-handler.js:3:65)

Commands

     -4:10.8.0 ember-cli-helper:open-component (input.hidden-input)
     -0:13.2.0 intentions:highlight (input.hidden-input)
     -0:08.6.0 ember-cli-helper:open-component (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-bootstrap3 1.2.12 
atom-handlebars 1.3.0 
autoclose-html 0.23.0 
busy-signal 1.4.3 
ember-cli-helper 0.9.0 
ember-snippets 2.1.2 
es6-javascript 1.0.0 
file-icons 2.1.11 
git-plus 7.9.3 
highlight-selected 0.13.1 
intentions 1.1.5 
less-than-slash 0.17.0 
linter 2.2.0 
linter-csslint 2.0.0 
linter-eslint 8.2.1 
linter-handlebars 2.5.0 
linter-ui-default 1.6.8 
merge-conflicts 1.4.5 
minimap 4.29.6 
minimap-highlight-selected 4.6.1 

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:54:11)
EmberCliHelperView.initialize (/home/bwwallin/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:23:9)

Looking for a maintainer

Hey,

I'm no longer using Atom or Ember and would like to give this project to someone motivated in keeping it alive. Let me know if you're up for it!

Marius

All-New UI

This plugin is just about as old as Atom itself, and the UI is awful. I know it. You know it. Everyone knows it.

I'm hoping to find either a UI framework to build on top of, or to find build myself something that can then be extended by other packages to create a unified system for commands that are being run/monitored through Atom. We'll see what happens.

Uncaught TypeError: Cannot read property 'indexOf' of undefined

  1. Installed atom-ember-cli-helper
  2. click on c/t button

Atom Version: 1.0.19
System: Mac OS X 10.10.4
Thrown From: ember-cli-helper package, v0.9.0

Stack Trace

Uncaught TypeError: Cannot read property 'indexOf' of undefined

At /Users/anil/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:84

TypeError: Cannot read property 'indexOf' of undefined
  at EmberCliHelperView.module.exports.EmberCliHelperView.getPathComponents (/Users/anil/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:84:26)
  at EmberCliHelperView.module.exports.EmberCliHelperView.switchFile (/Users/anil/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:96:51)
  at HTMLButtonElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
  at HTMLButtonElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
  at HTMLButtonElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -8:12.7.0 settings-view:open (ul.list-inline.status-container)
  2x -8:04.9.0 core:backspace (atom-text-editor.editor.mini.is-focused)
  3x -8:03.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "openEmptyEditorOnStart": false
  }
}

Installed Packages

# User
atom-html-preview, v0.1.11
auto-indent, v0.5.0
ember-cli-helper, v0.9.0
git-plus, v5.4.7
remember-session, v0.5.1
save-session, v0.15.7
terminal-plus, v0.6.5

# Dev
No dev packages

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/usr/share/atom/resources/app/src/atom.js:54:11)
EmberCliHelperView.initialize (/home/bwwallin/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:22:9)

Settings option for the new "offer to generate file" feature

This new feature sounds useful, but based on how I've been using the file-switching tool I'd like to turn it off:
23c181a

It looks like adding options to atom plugins is pretty straightforward, it would probably be easy to do something like this?
https://github.com/lamabiker/atom-ember-cli-helper/pull/35/files
I would have it default to its previous behavior.

(sidenote - I found a minor typo:
23c181a#diff-742193ccdd99b6a6a737d75141713b24R275 )

Alternate path option

I run my project root with an api directory and an ember directory where the ember-cli project is held. It would be nice to be able to tell atom-ember-cli-helper where to execute the command so that you don't get:

screen shot 2014-12-29 at 9 03 14 am

error finding ember executable

interesting error:

Failed to spawn command /usr/local/bin/ember. Make sure /usr/local/bin/ember is installed and on your PATH

Ember is intact at /usr/local/bin so I wonder if anyone knows whats up.

Component/Template shortcut (ctrl+alt+e) only searches active pane

When using the ctrl+alt+e shortcut (and presumably ctrl+alt+r as well -- can't test since I don't use controllers), only the active pane is searched for the corresponding component/template. If it's already open in a tab in a different (non-active) pane, it reopens the file in a new tab in the active pane rather than switching to the existing tab.

Should be fixable by adding the searchAllPanes option to the atom.workspace.open call in openBestMatch.

Server cannot be opened

When I click the Server button, console logged "Uncaught Error: spawn ENOENT", but the panel shows "Ember CLI Server Started".
Running Atom on: OSX 10.9.3, Node(v0.10.29) installed with nvm.

Option to disable commands

We use a docker-compose setup in dev, so I don't need the commands/console. Would be nice to have a setting to disable them so I don't have to close them each time.

nvm support

Hello, any plans to support NVM? I didn't install ember globally because I maintain different node versions via nvm.

Disabling Auto-Generation breaks file-toggling

When I disable the new option "Enable generating from blueprint", then file toggling (like via ctrl+alt+e) stops working. When I re-enable the option, it works again.

I have an idea why - I'll make a PR to show it.

More generator options - alterntive script/templating languages

Just wondering... I assume for a project that uses ember-cli-livescript, it imports the livescript blueprints and so it would generate the script files in livescript? or do we need a special option like the coffeescript one? How about emblem templates? EmberScript should also finally work with ember-cli now...

Uncaught TypeError: Cannot read property 'file' of undefined

  1. Open a template
  2. Click the c/t button to open the corresponding controller.

Atom: 1.23.0-beta1 x64
Electron: 1.6.15
OS: Mac OS X 10.13.1
Thrown From: ember-cli-helper package 0.16.0

Stack Trace

Uncaught TypeError: Cannot read property 'file' of undefined

At /Users/danston/.atom/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:110

TypeError: Cannot read property 'file' of undefined
    at EmberCliHelperView.module.exports.EmberCliHelperView.getPathComponents (/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:110:26)
    at EmberCliHelperView.module.exports.EmberCliHelperView.switchFile (/packages/ember-cli-helper/lib/ember-cli-helper-view.coffee:132:51)
    at /packages/ember-cli-helper/node_modules/atom-space-pen-views/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.dispatch (/packages/ember-cli-helper/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/packages/ember-cli-helper/node_modules/atom-space-pen-views/node_modules/space-pen/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -3:01.1.0 core:close (div.results-view.focusable-panel)
     -2:55.5.0 fuzzy-finder:toggle-file-finder (input.hidden-input)
  5x -2:54 core:backspace (input.hidden-input)
     -2:52.7.0 core:confirm (input.hidden-input)
     -2:38.2.0 core:close (input.hidden-input)
     -2:27.4.0 core:select-all (input.hidden-input)
     -2:27.2.0 core:backspace (input.hidden-input)
  3x -2:14.4.0 core:close (input.hidden-input)
     -2:13.1.0 fuzzy-finder:toggle-file-finder (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
  4x -2:10.6.0 core:backspace (input.hidden-input)
     -2:08.0 core:confirm (input.hidden-input)
     -1:49 project-find:show (input.hidden-input)
     -1:46.6.0 core:confirm (input.hidden-input)
     -1:41.1.0 core:close (div.results-view.focusable-panel)
  5x -0:43.2.0 core:backspace (input.hidden-input)
     -0:17 tree-view:reveal-active-file (input.hidden-input)

Non-Core Packages

activate-power-mode 2.6.0 
atom-beautify 0.30.6 
atom-handlebars 1.3.0 
atom-jade 0.3.0 
atom-typescript 11.0.10 
blame 1.0.1 
busy-signal 1.4.3 
docblockr 0.13.2 
ember-cli-helper 0.16.0 
ember-snippets 2.1.5 
file-icons 2.1.14 
intentions 1.1.5 
language-ember-htmlbars 0.4.0 
language-proto 0.8.0 
language-protobuf 0.7.1 
language-pug 0.0.21 
language-slim 1.0.0 
linter 2.2.0 
linter-eslint 8.4.0 
linter-ui-default 1.6.10 
minimap 4.29.7 
minimap-git-diff 4.3.1 
multi-cursor 2.1.5 
open-in-browser 0.5.2 
open-on-bitbucket 0.5.0 
split-diff 1.5.1 
termination 0.6.1 
todo-show 2.1.0 
toggle-quotes 1.0.1 

Windows invalid PATH set

When this package is activated a new PATH environment variable is created with an invalid value of:

> process.env.PATH
< "undefined:/usr/local/bin/"

Where atom loads the PATH environment variable on windows as:

> process.env.Path
< "C:\ProgramData\chocolatey\lib\cwrsync\tools\cwrsync\bin;C:\tools\cmder\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\share\vim\vim74;C:\tools\cmder\vendor\conemu-maximus5;C:\tools\cmder\vendor\conemu-maximus5\ConEmu;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\tools\ruby23\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Oracle\VirtualBox;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\opscode\chefdk\bin\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\tools\cmder;C:\PROGRA~2\Oracle\VirtualBox;C:\Users\TESTUSER\AppData\Local\atom\bin;C:\Program Files\kdiff3;C:\Users\TESTUSER\AppData\Roaming\npm;C:\tools\cmder\"

The issue causes a bit of chaos on other packages that use the PATH to load their own tools such as with AtomLinter/linter-tidy#68

Environment:

Windows 10 x64
Atom v1.8.0
ember-cli-helper v0.9.0

as always thank you for providing this excellent tool for ember devs

Customize Ember Location

I'm using nvm and so, ember and node aren't available at the default paths. It would be nice to be able to customize those locations, but I couldn't find a 'settings' on this plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.