-
-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
const chalk = require("chalk"); | ||
const TemplateConfig = require("./TemplateConfig"); | ||
const EleventyErrorHandler = require("./EleventyErrorHandler"); | ||
const debug = require("debug")("Eleventy:Config"); | ||
|
||
debug("Setting up global TemplateConfig."); | ||
let config = new TemplateConfig(); | ||
let config; | ||
try { | ||
config = new TemplateConfig(); | ||
} catch (e) { | ||
console.log("\n" + chalk.red("Problem with Eleventy configuration: ")); | ||
|
||
EleventyErrorHandler.log(e); | ||
} | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const missingModule = require("this-is-a-module-that-does-not-exist"); | ||
|
||
module.exports = function(eleventyConfig) { | ||
eleventyConfig.addFilter("cssmin", function(code) { | ||
return missingModule(code); | ||
}); | ||
|
||
return {}; | ||
}; |