Skip to content

Commit

Permalink
Fixed Komodo extensions loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeche committed Mar 31, 2013
1 parent df28418 commit da5e452
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion javascript/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ emmet.define('resources', function(require, _) {
/**
* Returns resource (abbreviation, snippet, etc.) matched for passed
* abbreviation
* @param {TreeNode} node
* @param {AbbreviationNode} node
* @param {String} syntax
* @returns {Object}
*/
Expand Down
27 changes: 13 additions & 14 deletions plugins/komodo/content/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,20 @@ emmet.exec(function(require, _) {
require('bootstrap').loadSystemSnippets(snippets);

// Load extensions
var extPath = require('file').createPath(DirIO.get('Home').path, 'emmet', function(extPath) {
var rootDir = FileIO.open(extPath);
var extPath = require('file').createPath(DirIO.get('Home').path, 'emmet');
var rootDir = FileIO.open(extPath);

if (rootDir.exists() && rootDir.isDirectory()) {
var extFiles = _.reject(DirIO.read(rootDir, true), function(f) {
return f.isDirectory();
});

if (rootDir.exists() && rootDir.isDirectory()) {
var extFiles = _.reject(DirIO.read(rootDir, true), function(f) {
return f.isDirectory();
});

extFiles = _.map(extFiles, function(f) {
return FileIO.path(f);
});

require('bootstrap').loadExtensions(extFiles);
}
});
extFiles = _.map(extFiles, function(f) {
return FileIO.path(f);
});

require('bootstrap').loadExtensions(extFiles);
}

} catch (e) {
ko.dialogs.alert('Error', e);
Expand Down
4 changes: 2 additions & 2 deletions plugins/komodo/content/js/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ emmet.define('file', function(require, _) {
* @param {String} file
* @return {String}
*/
createPath: function(dirname, file, callback) {
callback(createPath(dirname, file));
createPath: function(dirname, file) {
return createPath(dirname, file);
},

/**
Expand Down
2 changes: 1 addition & 1 deletion plugins/komodo/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:name>Emmet</em:name>
<em:version>1.0.3</em:version>
<em:version>1.0.4</em:version>
<em:description>Emmet toolkit for Komodo</em:description>
<em:creator>Sergey Chikuyonok</em:creator>
<em:homepageURL>http://emmet.io</em:homepageURL>
Expand Down

0 comments on commit da5e452

Please sign in to comment.