From 69f2d44bcdf019e66cb97762743bf578343e1d93 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 26 Oct 2011 11:46:03 -0700 Subject: [PATCH] plugins are now extensions --- Rakefile | 4 ++-- {plugins => extensions}/editor/editor-pane.coffee | 0 {plugins => extensions}/editor/editor.coffee | 4 ++-- {plugins => extensions}/editor/index.coffee | 0 {plugins => extensions}/filefinder/facebox.css | 0 {plugins => extensions}/filefinder/facebox.js | 0 .../filefinder/filefinder.coffee | 4 ++-- {plugins => extensions}/filefinder/filefinder.html | 0 .../filefinder/filefinderpane.coffee | 0 {plugins => extensions}/filefinder/index.coffee | 0 {plugins => extensions}/filefinder/stringscore.js | 0 .../project/images/dir-toggle.png | Bin {plugins => extensions}/project/index.coffee | 0 {plugins => extensions}/project/project.coffee | 4 ++-- {plugins => extensions}/project/project.html | 2 +- {plugins => extensions}/project/projectpane.coffee | 0 {plugins => extensions}/tabs/index.coffee | 0 {plugins => extensions}/tabs/tabs.coffee | 4 ++-- {plugins => extensions}/tabs/tabs.css | 0 {plugins => extensions}/tabs/tabs.html | 0 {plugins => extensions}/tabs/tabsPane.coffee | 0 {plugins => extensions}/tinytest/index.coffee | 0 {plugins => extensions}/tinytest/tinytest.coffee | 4 ++-- src/require.coffee | 2 +- test/resolve_test.coffee | 4 ++-- 25 files changed, 16 insertions(+), 16 deletions(-) rename {plugins => extensions}/editor/editor-pane.coffee (100%) rename {plugins => extensions}/editor/editor.coffee (98%) rename {plugins => extensions}/editor/index.coffee (100%) rename {plugins => extensions}/filefinder/facebox.css (100%) rename {plugins => extensions}/filefinder/facebox.js (100%) rename {plugins => extensions}/filefinder/filefinder.coffee (81%) rename {plugins => extensions}/filefinder/filefinder.html (100%) rename {plugins => extensions}/filefinder/filefinderpane.coffee (100%) rename {plugins => extensions}/filefinder/index.coffee (100%) rename {plugins => extensions}/filefinder/stringscore.js (100%) rename {plugins => extensions}/project/images/dir-toggle.png (100%) rename {plugins => extensions}/project/index.coffee (100%) rename {plugins => extensions}/project/project.coffee (94%) rename {plugins => extensions}/project/project.html (93%) rename {plugins => extensions}/project/projectpane.coffee (100%) rename {plugins => extensions}/tabs/index.coffee (100%) rename {plugins => extensions}/tabs/tabs.coffee (95%) rename {plugins => extensions}/tabs/tabs.css (100%) rename {plugins => extensions}/tabs/tabs.html (100%) rename {plugins => extensions}/tabs/tabsPane.coffee (100%) rename {plugins => extensions}/tinytest/index.coffee (100%) rename {plugins => extensions}/tinytest/tinytest.coffee (93%) diff --git a/Rakefile b/Rakefile index f9abe37e3..4d354a2e4 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,7 @@ task :build do dest = File.join(built_dir, contents_dir, "Resources") - %w( index.html src docs static plugins test vendor ).each do |dir| + %w( index.html src docs static extensions test vendor ).each do |dir| rm_rf File.join(dest, dir) cp_r dir, File.join(dest, dir) end @@ -19,7 +19,7 @@ task :build do "http://coffeescript.org/ - (try `npm i -g coffee-script`)" end - %w( src plugins ).each do |dir| + %w( src extensions ).each do |dir| Dir["#{dir}/**/*.coffee"].each do |file| sh "coffee -c #{dest}/#{dir}" end diff --git a/plugins/editor/editor-pane.coffee b/extensions/editor/editor-pane.coffee similarity index 100% rename from plugins/editor/editor-pane.coffee rename to extensions/editor/editor-pane.coffee diff --git a/plugins/editor/editor.coffee b/extensions/editor/editor.coffee similarity index 98% rename from plugins/editor/editor.coffee rename to extensions/editor/editor.coffee index ff0b7458d..e952078b9 100644 --- a/plugins/editor/editor.coffee +++ b/extensions/editor/editor.coffee @@ -2,7 +2,7 @@ _ = require 'underscore' File = require 'fs' Chrome = require 'chrome' -Plugin = require 'plugin' +Extension = require 'extension' EditorPane = require 'editor/editor-pane' {bindKey} = require 'keybinder' @@ -13,7 +13,7 @@ ace = require 'ace/ace' {UndoManager} = require 'ace/undomanager' module.exports = -class Editor extends Plugin +class Editor extends Extension filename: null keymap: -> diff --git a/plugins/editor/index.coffee b/extensions/editor/index.coffee similarity index 100% rename from plugins/editor/index.coffee rename to extensions/editor/index.coffee diff --git a/plugins/filefinder/facebox.css b/extensions/filefinder/facebox.css similarity index 100% rename from plugins/filefinder/facebox.css rename to extensions/filefinder/facebox.css diff --git a/plugins/filefinder/facebox.js b/extensions/filefinder/facebox.js similarity index 100% rename from plugins/filefinder/facebox.js rename to extensions/filefinder/facebox.js diff --git a/plugins/filefinder/filefinder.coffee b/extensions/filefinder/filefinder.coffee similarity index 81% rename from plugins/filefinder/filefinder.coffee rename to extensions/filefinder/filefinder.coffee index 9d6abb5e4..412ac0ff1 100644 --- a/plugins/filefinder/filefinder.coffee +++ b/extensions/filefinder/filefinder.coffee @@ -1,8 +1,8 @@ -Plugin = require 'plugin' +Extension = require 'extension' FileFinderPane = require 'filefinder/filefinderpane' module.exports = -class Filefinder extends Plugin +class Filefinder extends Extension keymap: -> 'Command-T': => @pane.toggle() # really wish i could put up/down keyboad shortcuts here diff --git a/plugins/filefinder/filefinder.html b/extensions/filefinder/filefinder.html similarity index 100% rename from plugins/filefinder/filefinder.html rename to extensions/filefinder/filefinder.html diff --git a/plugins/filefinder/filefinderpane.coffee b/extensions/filefinder/filefinderpane.coffee similarity index 100% rename from plugins/filefinder/filefinderpane.coffee rename to extensions/filefinder/filefinderpane.coffee diff --git a/plugins/filefinder/index.coffee b/extensions/filefinder/index.coffee similarity index 100% rename from plugins/filefinder/index.coffee rename to extensions/filefinder/index.coffee diff --git a/plugins/filefinder/stringscore.js b/extensions/filefinder/stringscore.js similarity index 100% rename from plugins/filefinder/stringscore.js rename to extensions/filefinder/stringscore.js diff --git a/plugins/project/images/dir-toggle.png b/extensions/project/images/dir-toggle.png similarity index 100% rename from plugins/project/images/dir-toggle.png rename to extensions/project/images/dir-toggle.png diff --git a/plugins/project/index.coffee b/extensions/project/index.coffee similarity index 100% rename from plugins/project/index.coffee rename to extensions/project/index.coffee diff --git a/plugins/project/project.coffee b/extensions/project/project.coffee similarity index 94% rename from plugins/project/project.coffee rename to extensions/project/project.coffee index 90d7ca434..d8453d27f 100644 --- a/plugins/project/project.coffee +++ b/extensions/project/project.coffee @@ -1,11 +1,11 @@ _ = require 'underscore' File = require 'fs' -Plugin = require 'plugin' +Extension = require 'extension' ProjectPane = require 'project/projectpane' module.exports = -class Project extends Plugin +class Project extends Extension keymap: -> 'Command-Ctrl-N': -> @pane.toggle() diff --git a/plugins/project/project.html b/extensions/project/project.html similarity index 93% rename from plugins/project/project.html rename to extensions/project/project.html index dec64cd24..db3695c1c 100644 --- a/plugins/project/project.html +++ b/extensions/project/project.html @@ -45,7 +45,7 @@ } #project li.dir { - background: url('plugins/project/images/dir-toggle.png') 9px 6px no-repeat; + background: url('extensions/project/images/dir-toggle.png') 9px 6px no-repeat; } #project li.dir.open { diff --git a/plugins/project/projectpane.coffee b/extensions/project/projectpane.coffee similarity index 100% rename from plugins/project/projectpane.coffee rename to extensions/project/projectpane.coffee diff --git a/plugins/tabs/index.coffee b/extensions/tabs/index.coffee similarity index 100% rename from plugins/tabs/index.coffee rename to extensions/tabs/index.coffee diff --git a/plugins/tabs/tabs.coffee b/extensions/tabs/tabs.coffee similarity index 95% rename from plugins/tabs/tabs.coffee rename to extensions/tabs/tabs.coffee index 04a99a520..d66cf58dd 100644 --- a/plugins/tabs/tabs.coffee +++ b/extensions/tabs/tabs.coffee @@ -1,11 +1,11 @@ $ = require 'jquery' -Plugin = require 'plugin' +Extension = require 'extension' File = require 'fs' TabsPane = require 'tabs/tabspane' module.exports = -class Tabs extends Plugin +class Tabs extends Extension # The Editor pane we're managing. editor: null diff --git a/plugins/tabs/tabs.css b/extensions/tabs/tabs.css similarity index 100% rename from plugins/tabs/tabs.css rename to extensions/tabs/tabs.css diff --git a/plugins/tabs/tabs.html b/extensions/tabs/tabs.html similarity index 100% rename from plugins/tabs/tabs.html rename to extensions/tabs/tabs.html diff --git a/plugins/tabs/tabsPane.coffee b/extensions/tabs/tabsPane.coffee similarity index 100% rename from plugins/tabs/tabsPane.coffee rename to extensions/tabs/tabsPane.coffee diff --git a/plugins/tinytest/index.coffee b/extensions/tinytest/index.coffee similarity index 100% rename from plugins/tinytest/index.coffee rename to extensions/tinytest/index.coffee diff --git a/plugins/tinytest/tinytest.coffee b/extensions/tinytest/tinytest.coffee similarity index 93% rename from plugins/tinytest/tinytest.coffee rename to extensions/tinytest/tinytest.coffee index daa06ebc4..f5764444e 100644 --- a/plugins/tinytest/tinytest.coffee +++ b/extensions/tinytest/tinytest.coffee @@ -3,12 +3,12 @@ _ = require 'underscore' Pane = require 'pane' File = require 'fs' -Plugin = require 'plugin' +Extension = require 'extension' {CoffeeScript} = require 'coffee-script' module.exports = -class TinyTest extends Plugin +class TinyTest extends Extension keymap: -> 'Command-Ctrl-T': 'runTests' diff --git a/src/require.coffee b/src/require.coffee index c32fdf0f1..21c50568b 100644 --- a/src/require.coffee +++ b/src/require.coffee @@ -2,7 +2,7 @@ resourcePath = OSX.NSBundle.mainBundle.resourcePath paths = [ "#{resourcePath}/src" - "#{resourcePath}/plugins" + "#{resourcePath}/extensions" "#{resourcePath}/vendor" ] diff --git a/test/resolve_test.coffee b/test/resolve_test.coffee index 3c53b3abe..594f11335 100644 --- a/test/resolve_test.coffee +++ b/test/resolve_test.coffee @@ -5,14 +5,14 @@ root = OSX.NSBundle.mainBundle.resourcePath resolve = (path) -> # use a list of known load paths in the tests paths = require.paths - require.paths = [ "#{root}/src", "#{root}/plugins", "#{root}/vendor" ] + require.paths = [ "#{root}/src", "#{root}/extensions", "#{root}/vendor" ] path = require.resolve path require.paths = paths path assert.equal resolve('underscore'), "#{root}/vendor/underscore.js" assert.equal resolve('app'), "#{root}/src/app.js" -assert.equal resolve('tabs/tabs'), "#{root}/plugins/tabs/tabs.js" +assert.equal resolve('tabs/tabs'), "#{root}/extensions/tabs/tabs.js" # assert.equal resolve('./document'), "#{root}/src/document.js" # assert.equal resolve('../README.md'), "#{root}/README.md"