diff options
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/config.js | 3 | ||||
-rw-r--r-- | lib/models/file.js | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/models/config.js b/lib/models/config.js index 8684a03..720ac57 100644 --- a/lib/models/config.js +++ b/lib/models/config.js @@ -2,10 +2,11 @@ var is = require('is'); var Immutable = require('immutable'); var File = require('./file'); +var configDefault = require('../constants/configDefault'); var Config = Immutable.Record({ file: File(), - values: Immutable.Map() + values: configDefault }, 'Config'); Config.prototype.getPath = function() { diff --git a/lib/models/file.js b/lib/models/file.js index b6b06ee..ff7b899 100644 --- a/lib/models/file.js +++ b/lib/models/file.js @@ -20,6 +20,15 @@ File.prototype.getMTime = function() { }; /** + Does the file exists / is set + + @return {Boolean} +*/ +File.prototype.exists = function() { + return Boolean(this.getPath()); +}; + +/** Return type of file ('markdown' or 'asciidoc') @return {String} |