diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..5448d1eec --- /dev/null +++ b/.gitmodules @@ -0,0 +1,36 @@ +[submodule "vendor/packages/text.tmbundle"] + path = vendor/packages/text.tmbundle + url = https://github.com/textmate/text.tmbundle.git +[submodule "vendor/packages/css.tmbundle"] + path = vendor/packages/css.tmbundle + url = https://github.com/textmate/css.tmbundle.git +[submodule "vendor/packages/html.tmbundle"] + path = vendor/packages/html.tmbundle + url = https://github.com/textmate/html.tmbundle.git +[submodule "vendor/packages/javascript.tmbundle"] + path = vendor/packages/javascript.tmbundle + url = https://github.com/textmate/javascript.tmbundle.git +[submodule "vendor/packages/ruby-on-rails-tmbundle"] + path = vendor/packages/ruby-on-rails-tmbundle + url = https://github.com/drnic/ruby-on-rails-tmbundle.git +[submodule "vendor/packages/ruby.tmbundle"] + path = vendor/packages/ruby.tmbundle + url = https://github.com/textmate/ruby.tmbundle.git +[submodule "vendor/packages/coffee-script-tmbundle"] + path = vendor/packages/coffee-script-tmbundle + url = https://github.com/kevinsawicki/coffee-script-tmbundle.git +[submodule "vendor/packages/puppet-textmate.tmbundle"] + path = vendor/packages/puppet-textmate.tmbundle + url = https://github.com/cburyta/puppet-textmate.tmbundle.git +[submodule "vendor/packages/c.tmbundle"] + path = vendor/packages/c.tmbundle + url = https://github.com/textmate/c.tmbundle.git +[submodule "vendor/packages/objective-c.tmbundle"] + path = vendor/packages/objective-c.tmbundle + url = https://github.com/textmate/objective-c.tmbundle.git +[submodule "vendor/packages/git.tmbundle"] + path = vendor/packages/git.tmbundle + url = https://github.com/textmate/git.tmbundle.git +[submodule "vendor/packages/json.tmbundle"] + path = vendor/packages/json.tmbundle + url = https://github.com/textmate/json.tmbundle.git diff --git a/Rakefile b/Rakefile index e85ba30a5..c4fe647b6 100644 --- a/Rakefile +++ b/Rakefile @@ -85,36 +85,9 @@ task "create-dot-atom" do `cp -r "#{dot_atom_template_path}/themes" "#{DOT_ATOM_PATH}"` end -desc "Clone default bundles into .atom directory" -task "clone-default-bundles" => "create-dot-atom" do - bundles = { - "https://github.com/textmate/css.tmbundle.git" => "aa549903ff01e9ba7dc0bd83f2cfe7ab54feab2d", - "https://github.com/textmate/html.tmbundle.git" => "af4fef34e1df538eda9a166912047b610530ece0", - "https://github.com/textmate/javascript.tmbundle.git" => "58e81b0eae498c9a4eb6e395368df3b7a01d9851", - "https://github.com/drnic/ruby-on-rails-tmbundle.git" => "683f6e652cc467e0007f80aa11f174a4d9189f3c", - "https://github.com/textmate/ruby.tmbundle.git" => "daad8ef03de9630e74578a046240fd9acc63b8b5", - "https://github.com/textmate/text.tmbundle.git" => "061224bd78fd98d02035466cdd959bf29995c2c5", - "https://github.com/jashkenas/coffee-script-tmbundle.git" => "20d9b95240bbbc27565c74c7227b8c6eb9049f78", - "https://github.com/cburyta/puppet-textmate.tmbundle.git" => "5ef4949b2c964bace86782573cb952751ca77f5e", - "https://github.com/textmate/c.tmbundle.git" => "c8a6516c1131055bfcd1bca5e2ee6567c2f50058", - "https://github.com/textmate/objective-c.tmbundle.git" => "b0826e645a3d8ca37dd625a56935d49cc8eeb9fc", - "https://github.com/textmate/git.tmbundle.git" => "132724ab03dfc70fc77deca8ef1a359dc8404d80", - "https://github.com/textmate/json.tmbundle.git" => "5765750aa970c72decef3e2fcefec16a0f22e427", - } - - `rm -rf #{File.join(DOT_ATOM_PATH, 'bundles', 'ruby-on-rails.tmbundle')}` # github/textmate removed this repo, use drnic's repo instead - - for bundle_url, sha in bundles - bundle_dir = bundle_url[/([^\/]+?)(\.git)?$/, 1] - dest_path = File.join(DOT_ATOM_PATH, "packages", bundle_dir) - if File.exists? dest_path - `cd #{dest_path} && git fetch --quiet` - else - `git clone --quiet #{bundle_url} #{dest_path}` - end - - `cd #{dest_path} && git reset --quiet --hard #{sha}` - end +desc "Clone default bundles into vendor/bundles directory" +task "clone-default-bundles" do + `git submodule update --recursive --init` end desc "Clean build Atom via `xcodebuild`" diff --git a/script/bootstrap b/script/bootstrap index de6b5542d..e437aa79c 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -19,3 +19,4 @@ exit_unless_xcode_exists exit_unless_npm_exists npm install +git submodule update --recursive --init diff --git a/src/app/config.coffee b/src/app/config.coffee index aed08732f..fca996949 100644 --- a/src/app/config.coffee +++ b/src/app/config.coffee @@ -11,6 +11,7 @@ configJsonPath = fs.join(configDirPath, "config.json") userInitScriptPath = fs.join(configDirPath, "atom.coffee") bundledThemesDirPath = fs.join(resourcePath, "themes") bundledPackagesDirPath = fs.join(resourcePath, "src/packages") +bundledVendorPackagesDirPath = fs.join(resourcePath, "vendor/packages") userThemesDirPath = fs.join(configDirPath, "themes") userPackagesDirPath = fs.join(configDirPath, "packages") @@ -20,7 +21,7 @@ module.exports = class Config configDirPath: configDirPath themeDirPaths: [userThemesDirPath, bundledThemesDirPath] - packageDirPaths: [userPackagesDirPath, bundledPackagesDirPath] + packageDirPaths: [userPackagesDirPath, bundledVendorPackagesDirPath, bundledPackagesDirPath] settings: null constructor: -> diff --git a/src/stdlib/require.coffee b/src/stdlib/require.coffee index 362fc2af2..e87742c19 100644 --- a/src/stdlib/require.coffee +++ b/src/stdlib/require.coffee @@ -5,6 +5,7 @@ paths = [ "#{window.resourcePath}/src/app" "#{window.resourcePath}/src/packages" "#{window.resourcePath}/src" + "#{window.resourcePath}/vendor/packages" "#{window.resourcePath}/vendor" "#{window.resourcePath}/static" "#{window.resourcePath}/bundles" diff --git a/vendor/packages/c.tmbundle b/vendor/packages/c.tmbundle new file mode 160000 index 000000000..c8a6516c1 --- /dev/null +++ b/vendor/packages/c.tmbundle @@ -0,0 +1 @@ +Subproject commit c8a6516c1131055bfcd1bca5e2ee6567c2f50058 diff --git a/vendor/packages/coffee-script-tmbundle b/vendor/packages/coffee-script-tmbundle new file mode 160000 index 000000000..29c6ecbc7 --- /dev/null +++ b/vendor/packages/coffee-script-tmbundle @@ -0,0 +1 @@ +Subproject commit 29c6ecbc7cd46466e25d11b01d57fb279085ce64 diff --git a/vendor/packages/css.tmbundle b/vendor/packages/css.tmbundle new file mode 160000 index 000000000..aa549903f --- /dev/null +++ b/vendor/packages/css.tmbundle @@ -0,0 +1 @@ +Subproject commit aa549903ff01e9ba7dc0bd83f2cfe7ab54feab2d diff --git a/vendor/packages/git.tmbundle b/vendor/packages/git.tmbundle new file mode 160000 index 000000000..132724ab0 --- /dev/null +++ b/vendor/packages/git.tmbundle @@ -0,0 +1 @@ +Subproject commit 132724ab03dfc70fc77deca8ef1a359dc8404d80 diff --git a/vendor/packages/html.tmbundle b/vendor/packages/html.tmbundle new file mode 160000 index 000000000..af4fef34e --- /dev/null +++ b/vendor/packages/html.tmbundle @@ -0,0 +1 @@ +Subproject commit af4fef34e1df538eda9a166912047b610530ece0 diff --git a/vendor/packages/javascript.tmbundle b/vendor/packages/javascript.tmbundle new file mode 160000 index 000000000..58e81b0ea --- /dev/null +++ b/vendor/packages/javascript.tmbundle @@ -0,0 +1 @@ +Subproject commit 58e81b0eae498c9a4eb6e395368df3b7a01d9851 diff --git a/vendor/packages/json.tmbundle b/vendor/packages/json.tmbundle new file mode 160000 index 000000000..5765750aa --- /dev/null +++ b/vendor/packages/json.tmbundle @@ -0,0 +1 @@ +Subproject commit 5765750aa970c72decef3e2fcefec16a0f22e427 diff --git a/vendor/packages/objective-c.tmbundle b/vendor/packages/objective-c.tmbundle new file mode 160000 index 000000000..b0826e645 --- /dev/null +++ b/vendor/packages/objective-c.tmbundle @@ -0,0 +1 @@ +Subproject commit b0826e645a3d8ca37dd625a56935d49cc8eeb9fc diff --git a/vendor/packages/puppet-textmate.tmbundle b/vendor/packages/puppet-textmate.tmbundle new file mode 160000 index 000000000..5ef4949b2 --- /dev/null +++ b/vendor/packages/puppet-textmate.tmbundle @@ -0,0 +1 @@ +Subproject commit 5ef4949b2c964bace86782573cb952751ca77f5e diff --git a/vendor/packages/ruby-on-rails-tmbundle b/vendor/packages/ruby-on-rails-tmbundle new file mode 160000 index 000000000..683f6e652 --- /dev/null +++ b/vendor/packages/ruby-on-rails-tmbundle @@ -0,0 +1 @@ +Subproject commit 683f6e652cc467e0007f80aa11f174a4d9189f3c diff --git a/vendor/packages/ruby.tmbundle b/vendor/packages/ruby.tmbundle new file mode 160000 index 000000000..daad8ef03 --- /dev/null +++ b/vendor/packages/ruby.tmbundle @@ -0,0 +1 @@ +Subproject commit daad8ef03de9630e74578a046240fd9acc63b8b5 diff --git a/vendor/packages/text.tmbundle b/vendor/packages/text.tmbundle new file mode 160000 index 000000000..061224bd7 --- /dev/null +++ b/vendor/packages/text.tmbundle @@ -0,0 +1 @@ +Subproject commit 061224bd78fd98d02035466cdd959bf29995c2c5