docpad-plugin-combiner
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -23,2 +23,6 @@ // Generated by CoffeeScript 1.6.3 | ||
CombinerPlugin.prototype.config = { | ||
collectionName: "combineOut" | ||
}; | ||
CombinerPlugin.prototype.locale = { | ||
@@ -33,11 +37,15 @@ addingCombineTo: "Adding combine: %s" | ||
CombinerPlugin.prototype.extendCollections = function(opts) { | ||
var docpad, locale; | ||
var config, docpad, locale; | ||
docpad = this.docpad; | ||
locale = this.locale; | ||
docpad.setCollection('combineOut', docpad.database.createLiveChildCollection().setQuery('isCombine', { | ||
config = this.getConfig(); | ||
docpad.setCollection(config.collectionName, docpad.database.createLiveChildCollection().setQuery('isCombine', { | ||
combine: true | ||
}).on('add', function(model) { | ||
docpad.log('debug', util.format(locale.addingCombine, model.attributes.fullPath)); | ||
model.set('render', true); | ||
return model.set('write', false); | ||
return model.setDefaults({ | ||
render: true, | ||
write: false, | ||
renderSingleExtensions: true | ||
}); | ||
})); | ||
@@ -48,5 +56,6 @@ return this; | ||
CombinerPlugin.prototype.renderAfter = function(opts, next) { | ||
var combineOutCollection, combineOutContent, combineOutFilePath, combineOutModel, config, contextRendered, key, outPath, outputFile, value, writeCount, _i, _len, _ref; | ||
var combineOutCollection, combineOutContent, combineOutFilePath, combineOutModel, config, contextRendered, key, outPath, outputFile, pluginConfig, value, writeCount, _i, _len, _ref; | ||
pluginConfig = this.getConfig(); | ||
config = this.docpad.getConfig(); | ||
combineOutCollection = this.docpad.getCollection("combineOut"); | ||
combineOutCollection = this.docpad.getCollection(pluginConfig.collectionName); | ||
if (!combineOutCollection) { | ||
@@ -53,0 +62,0 @@ if (typeof next === "function") { |
{ | ||
"name": "docpad-plugin-combiner", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "A Docpad plugin that adds the ability to combine parts to create a final master file", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/pflannery/docpad-plugin-combiner", |
@@ -53,4 +53,9 @@ # Combiner Plugin for [DocPad](http://docpad.org) | ||
## Configure | ||
Currenlty no options are available for this plugin | ||
``` | ||
combiner: | ||
# default collection name | ||
collectionName: "combineOut" | ||
``` | ||
## License | ||
@@ -57,0 +62,0 @@ Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9204
102
64