mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2024-11-05 01:56:21 +00:00
feat: allow FRESH themes to specify base folder
Currently, FRESH themes contain a `src` folder that contains theme artifacts. This commit allows the theme to specify a different folder (including "." or ""), supporting arbitrary folder structures.
This commit is contained in:
parent
5161a3a823
commit
9c096541ce
7
dist/core/fresh-theme.js
vendored
7
dist/core/fresh-theme.js
vendored
@ -36,7 +36,10 @@ Definition of the FRESHTheme class.
|
||||
*/
|
||||
|
||||
FRESHTheme = (function() {
|
||||
function FRESHTheme() {}
|
||||
function FRESHTheme() {
|
||||
this.baseFolder = 'src';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* Open and parse the specified theme. */
|
||||
@ -98,7 +101,7 @@ Definition of the FRESHTheme class.
|
||||
var copyOnly, fmts, jsFiles, major, that, tplFolder;
|
||||
that = this;
|
||||
major = false;
|
||||
tplFolder = PATH.join(this.folder, 'src');
|
||||
tplFolder = PATH.join(this.folder, this.baseFolder);
|
||||
copyOnly = ['.ttf', '.otf', '.png', '.jpg', '.jpeg', '.pdf'];
|
||||
fmts = READFILES(tplFolder).map(function(absPath) {
|
||||
return _loadOne.call(this, absPath, formatsHash, tplFolder);
|
||||
|
@ -24,7 +24,9 @@ READFILES = require 'recursive-readdir-sync'
|
||||
@class FRESHTheme ###
|
||||
class FRESHTheme
|
||||
|
||||
|
||||
constructor: () ->
|
||||
@baseFolder = 'src'
|
||||
return
|
||||
|
||||
### Open and parse the specified theme. ###
|
||||
open: ( themeFolder ) ->
|
||||
@ -86,7 +88,7 @@ _load = (formatsHash) ->
|
||||
|
||||
that = @
|
||||
major = false
|
||||
tplFolder = PATH.join @folder, 'src'
|
||||
tplFolder = PATH.join @folder, @baseFolder
|
||||
|
||||
copyOnly = ['.ttf','.otf', '.png','.jpg','.jpeg','.pdf']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user