Skip to content

Commit

Permalink
Neatened up the code
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Beney committed Dec 3, 2018
1 parent 8346156 commit 919a245
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 217 deletions.
18 changes: 9 additions & 9 deletions bliss-plugins/jekyll.js
@@ -1,12 +1,12 @@
class JekyllPlugin {
constructor() {
this.name = "Jekyll"
this.type = this.COMPILER
//this.requireWhenNeeded('some NPM module')
}
compile(siteDirectory, outputDirectory) {
// Code to execute jekyll in a directory
// and output it to the outputDirectory
}
constructor() {
this.name = "Jekyll"
this.type = this.COMPILER
//this.requireWhenNeeded('some NPM module')
}
compile(siteDirectory, outputDirectory) {
// Code to execute jekyll in a directory
// and output it to the outputDirectory
}
}
module.exports = JekyllPlugin
30 changes: 15 additions & 15 deletions bliss-plugins/pug.js
@@ -1,18 +1,18 @@
class PugPlugin {
constructor() {
this.name = "Pug"
this.type = this.PREPROCESSOR
this.extensions = [".pug"]
this.output_extension = ".html"
this.might_have_frontmatter = true
this.requireWhenNeeded('pug')
}
render(text) {
if (this.modules['pug']) {
return this.modules['pug'].render(text)
} else {
this.fatal_error("Error. pug is null")
}
}
constructor() {
this.name = "Pug"
this.type = this.PREPROCESSOR
this.extensions = [".pug"]
this.output_extension = ".html"
this.might_have_frontmatter = true
this.requireWhenNeeded('pug')
}
render(text) {
if (this.modules['pug']) {
return this.modules['pug'].render(text)
} else {
this.fatal_error("Error. 'pug' is null")
}
}
}
module.exports = PugPlugin

0 comments on commit 919a245

Please sign in to comment.