mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-12-22 13:37:21 +00:00
style: clean up comments in jrs-theme.coffee
This commit is contained in:
parent
54d056c4b7
commit
e6e0b135ed
8
dist/core/jrs-theme.js
vendored
8
dist/core/jrs-theme.js
vendored
@ -6,7 +6,7 @@ Definition of the JRSTheme class.
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var JRSTheme, PATH, _, parsePath, pathExists;
|
||||
var JRSTheme, PATH, _, errors, parsePath, pathExists;
|
||||
|
||||
_ = require('underscore');
|
||||
|
||||
@ -16,6 +16,8 @@ Definition of the JRSTheme class.
|
||||
|
||||
pathExists = require('path-exists').sync;
|
||||
|
||||
errors = require('./status-codes');
|
||||
|
||||
|
||||
/**
|
||||
The JRSTheme class is a representation of a JSON Resume theme asset.
|
||||
@ -27,7 +29,7 @@ Definition of the JRSTheme class.
|
||||
|
||||
|
||||
/**
|
||||
Open and parse the specified theme.
|
||||
Open and parse the specified JRS theme.
|
||||
@method open
|
||||
*/
|
||||
|
||||
@ -70,7 +72,7 @@ Definition of the JRSTheme class.
|
||||
};
|
||||
} else {
|
||||
throw {
|
||||
fluenterror: HACKMYSTATUS.missingPackageJSON
|
||||
fluenterror: errors.missingPackageJSON
|
||||
};
|
||||
}
|
||||
return this;
|
||||
|
@ -10,6 +10,7 @@ _ = require 'underscore'
|
||||
PATH = require 'path'
|
||||
parsePath = require 'parse-filepath'
|
||||
pathExists = require('path-exists').sync
|
||||
errors = require './status-codes'
|
||||
|
||||
|
||||
|
||||
@ -22,22 +23,19 @@ class JRSTheme
|
||||
|
||||
|
||||
###*
|
||||
Open and parse the specified theme.
|
||||
Open and parse the specified JRS theme.
|
||||
@method open
|
||||
###
|
||||
open: ( thFolder ) ->
|
||||
|
||||
@folder = thFolder
|
||||
|
||||
# Open the [theme-name].json file; should have the same
|
||||
# name as folder
|
||||
pathInfo = parsePath thFolder
|
||||
|
||||
# Open and parse the theme's package.json file.
|
||||
# Open and parse the theme's package.json file
|
||||
pkgJsonPath = PATH.join thFolder, 'package.json'
|
||||
if pathExists pkgJsonPath
|
||||
thApi = require thFolder
|
||||
thPkg = require pkgJsonPath
|
||||
thApi = require thFolder # Requiring the folder yields whatever the package.json's "main" is set to
|
||||
thPkg = require pkgJsonPath # Get the package.json as JSON
|
||||
this.name = thPkg.name
|
||||
this.render = (thApi && thApi.render) || undefined
|
||||
this.engine = 'jrs'
|
||||
@ -65,7 +63,7 @@ class JRSTheme
|
||||
css: null
|
||||
}]
|
||||
else
|
||||
throw { fluenterror: HACKMYSTATUS.missingPackageJSON };
|
||||
throw fluenterror: errors.missingPackageJSON
|
||||
@
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user