diff --git a/package.json b/package.json index 96be0a1e83e..8012ff16878 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "get-object-path": "azer/get-object-path#74eb42de0cfd02c14ffdd18552f295aba723d394", "hadron-action": "^0.0.4", "hadron-auto-update-manager": "^0.0.12", - "hadron-compile-cache": "^0.2.0", + "hadron-compile-cache": "^0.3.0", "hadron-component-registry": "^0.4.0", "hadron-document": "^0.14.0", "hadron-ipc": "^0.0.7", @@ -119,7 +119,6 @@ "local-links": "^1.4.0", "lodash": "^3.10.1", "marked": "^0.3.5", - "marky-mark": "^1.2.1", "moment": "^2.10.6", "mongodb-collection-model": "^0.2.3", "mongodb-connection-model": "^4.3.0", @@ -152,7 +151,7 @@ "devDependencies": { "eslint-config-mongodb-js": "^1.0.6", "eslint-plugin-react": "^4.1.0", - "hadron-build": "^0.6.3", + "hadron-build": "^0.6.5", "hadron-test-utils": "^0.0.8", "xvfb-maybe": "^0.1.3" }, diff --git a/src/help/help-entry-collection.js b/src/help/help-entry-collection.js index 689cf216694..ebb8dd1d3b1 100644 --- a/src/help/help-entry-collection.js +++ b/src/help/help-entry-collection.js @@ -5,10 +5,9 @@ var selectableMixin = require('../app/models/selectable-collection-mixin'); var filterableMixin = require('ampersand-collection-filterable'); var withSync = require('../app/models/with-sync'); var debug = require('debug')('mongodb-compass:help:help-entry-collection'); -var mm = require('marky-mark'); var path = require('path'); var _ = require('lodash'); -var highlight = require('highlight.js'); +var fs = require('fs'); var HelpEntryCollection = Collection.extend( selectableMixin, lodashMixin, filterableMixin, { @@ -29,25 +28,17 @@ var HelpEntryCollection = Collection.extend( } var dir = path.join(__dirname, 'entries'); - debug('parsing entries with marky-mark from `%s`', dir); - - // add syntax highlighting options, pass through to `marked` module - var parserOptions = { - marked: { - highlight: function(code) { - var result = highlight.highlightAuto(code).value; - return result; - } - } - }; - - mm.parseDirectory(dir, parserOptions, function(err, entries) { + fs.readdir(dir, function(err, files) { if (err) { - debug('error parsing entries', err); + debug('error reading entries', err); done(err); return; } - debug('successfully parsed!', entries); + + var entries = _.map(files, function(file) { + return require(path.join(dir, file)); + }); + // in production don't return the dev-only entries if (process.env.NODE_ENV === 'production') { entries = _.filter(entries, function(entry) { diff --git a/src/help/index.js b/src/help/index.js index b1524f4b674..0b83bbf3e86 100644 --- a/src/help/index.js +++ b/src/help/index.js @@ -128,9 +128,7 @@ var HelpPage = View.extend({ if (!entry) { debug('Unknown help entry', entryId); this.viewSwitcher.clear(); - app.statusbar.showMessage({ - message: 'Help entry not found.' - }); + app.statusbar.showMessage('Help entry not found.'); return; }