From 6792e634b736183ad242bd898bc2bbd36363c928 Mon Sep 17 00:00:00 2001 From: Andrew Willis Date: Thu, 5 Mar 2015 20:25:36 -0500 Subject: [PATCH] updated selectors and editor to work with latest Atom API --- keymaps/pipe.cson | 2 +- lib/command-view.coffee | 5 +++-- lib/pipe.coffee | 2 +- package.json | 12 +++++++----- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/keymaps/pipe.cson b/keymaps/pipe.cson index d729528..cd5b078 100644 --- a/keymaps/pipe.cson +++ b/keymaps/pipe.cson @@ -7,5 +7,5 @@ # For more detailed documentation see # https://atom.io/docs/latest/advanced/keymaps -'.editor': +'.atom-text-editor': 'cmd-;': 'pipe:run' diff --git a/lib/command-view.coffee b/lib/command-view.coffee index 8ac7c49..0b9e865 100644 --- a/lib/command-view.coffee +++ b/lib/command-view.coffee @@ -1,4 +1,5 @@ -{View, EditorView} = require 'atom' +{View, TextEditorView} = require 'atom-space-pen-views' + module.exports = class CommandView extends View @@ -12,7 +13,7 @@ class CommandView extends View @content: -> @div class: 'pipe-command', => - @subview 'commandLine', new EditorView( + @subview 'commandLine', new TextEditorView( mini: true placeholderText: @samplePlaceholder() ) diff --git a/lib/pipe.coffee b/lib/pipe.coffee index 3781a56..97ada8a 100644 --- a/lib/pipe.coffee +++ b/lib/pipe.coffee @@ -6,7 +6,7 @@ history = [] module.exports = activate: -> - atom.workspaceView.command 'pipe:run', => @run() + atom.commands.add 'atom-workspace', "pipe:run", => @run() run: -> editor = atom.workspace.getActiveEditor() diff --git a/package.json b/package.json index 013f8a0..6393441 100644 --- a/package.json +++ b/package.json @@ -3,18 +3,20 @@ "main": "./lib/pipe", "version": "0.3.2", "description": "Pipe text in and out of external commands.", - "activationEvents": [ - "pipe:run" - ], + "activationCommands": { + "atom-workspace": "pipe:run" + }, "repository": { "type": "git", "url": "https://github.com/moshee/atom-pipe" }, "license": "MIT", "engines": { - "atom": ">0.72.0" + "atom": ">0.182.0 <2.0.0" + }, + "dependencies": { + "atom-space-pen-views": ">2.0.0" }, - "dependencies": {}, "readme": "# pipe\n\nSelect text to pipe into external commands and replace it with the output. Sort\nof like `!` in vim. Commands are sent to your `$SHELL`.\n\nDefault keybinding to activate is `cmd-;`.\n\n![pipe in action](https://i.ktkr.us/hoeJ)\n", "readmeFilename": "README.md", "bugs": { -- 2.39.2