migeorge / erb-helper Goto Github PK
View Code? Open in Web Editor NEWERB Helper makes it easy to insert and wrap ERB tags with Atom.
License: MIT License
ERB Helper makes it easy to insert and wrap ERB tags with Atom.
License: MIT License
Hello,
I'm finding that the erb helper is mysteriously flagging the first line of several do blocks in my code.
For example, the first line of this block is flagged with the error unexpected end-of-input, expecting ')'
<%= link_to company_issues_path(@company), no_turbolink: true do %>
<% if @company.issues.where(resolved: false).count == 0 %>
<span id="warn">!</span>
<% else %>
<span id="warn" class="warning">!</span>
<% end %>
<span class="label"><%= @company.issues.where(resolved: false).count %> Unresolved</span>
<% end %>
Another example with error unexpected ')'
:
<%= link_to company_path(@company.id), class: "link dashboard", data: {no_turbolink: true}, title: "Dashboard" do %>
<span class="icon glyphicon glyphicon-dashboard"></span>
<span class="label">Dashboard</span>
<% end %>
It's entirely possible that I might not be using the best syntax here so if there's a better way to write it feel free to make a suggestion.
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:355:14)
Atom will no longer load this package after June 1st without changes. There are a couple deprecations on the latest version (0.2.1
) of this package:
activationCommands
instead of activationEvents
in your package.json Commands should be grouped by selector as follows: json "activationCommands": { "atom-workspace": ["foo:bar", "foo:baz"], "atom-text-editor": ["foo:quux"] }
atom.views.getView(atom.workspace)
, which returns an HTMLElement.Visit https://gist.github.com/benogle/6d09e295c84b717ef9b4 and search for your package name to see up-to-date deprecations.
If this package has been replaced by another package or functionality in core, please reply with this information.
See atom/atom#6867 for more info. Thanks!
The context menu CSON format has changed. Please see
https://atom.io/docs/api/latest/ContextMenuManager
Hello, this is my first issue report; so if i doing this wrong please be gentle.
I'm learning Ruby on Rails and i love Atom. I want to use your package but i cant get it to working.
When i right-click and select ERB-Output tag for example, it works.
But when i do Ctrl - . it makes the line in comment like # blabla
What must i do further or what am i missing?
Hello,
Are you still taking PR's on this project? If so, I'd like to submit one, but I don't want to write it out if this project is no longer maintained.
Thank you!
[Enter steps to reproduce below:]
Atom Version: 0.192.0
System: Mac OS X 10.10.3
Thrown From: erb-helper package, v0.2.1
Failed to activate the erb-helper package
At Cannot read property 'command' of undefined
TypeError: Cannot read property 'command' of undefined
at Object.module.exports.activate (/Users/matheuscandido/.atom/packages/erb-helper/lib/erb-helper.coffee:4:25)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:222:19)
at /Applications/Atom.app/Contents/Resources/app/src/package.js:203:30
at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:147:15)
at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:195:14)
at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:434:21)
at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:418:29
at Config.module.exports.Config.transact (/Applications/Atom.app/Contents/Resources/app/src/config.js:298:16)
at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:413:19)
at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:394:46)
{
"core": {
"themes": [
"seti-ui",
"seti-syntax"
]
}
}
# User
codeigniter, v0.1.3
emmet, v2.3.7
erb-helper, v0.2.1
rails-snippets, v1.9.0
set-syntax, v0.2.1
seti-syntax, v0.3.3
seti-ui, v0.6.3
# Dev
No dev packages
[Enter steps to reproduce:]
I pressed keys ctr + shift + 9 on a AZERTY keyboard
Atom: 1.18.0 x64
Electron: 1.3.15
OS: Mac OS X 10.12.5
Thrown From: erb-helper package 1.1.0
Uncaught TypeError: Cannot read property 'getSelectedText' of undefined
At /Users/aymericbouzy/.atom/packages/erb-helper/lib/erb-helper.coffee:44
TypeError: Cannot read property 'getSelectedText' of undefined
at Object.insertTag (/packages/erb-helper/lib/erb-helper.coffee:44:23)
at Object.end (/packages/erb-helper/lib/erb-helper.coffee:31:6)
at /packages/erb-helper/lib/erb-helper.coffee:12:34)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:35)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:65
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:610:22)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:401:28)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:100:42)
at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:3:65)
-0:29.9.0 command-palette:toggle (atom-pane.pane)
13x -0:26.5.0 core:move-down (input.hidden-input)
7x -0:24.9.0 core:move-up (input.hidden-input)
-0:22.8.0 core:move-down (input.hidden-input)
-0:15 erb-helper:end (input.hidden-input)
-0:13.9.0 editor:consolidate-selections (input.hidden-input)
-0:13.9.0 core:cancel (input.hidden-input)
atom-beautify 0.29.26
busy-signal 1.4.3
erb-helper 1.1.0
intentions 1.1.2
language-babel 2.66.0
linter 2.1.4
linter-csslint 1.3.4
linter-erb 1.1.0
linter-eslint 8.2.1
linter-scss-lint 3.1.0
linter-ui-default 1.6.1
react 0.16.2
tidy-tabs 0.4.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.