docpad-plugin-combiner

A Docpad plugin that adds the ability to combine parts to create a final master file

Combiner Plugin for DocPad

Convention:

Join file parts together of any type. Can be any file type. Can be mixed with layouts too

Example:

  • test.js

      ---
      combine: true
      outPath: scripts/myScript.js
      write: false # prevents "Rename one of them to avoid an over-write" message
      ---
      function foo(){}
    
  • anothTest.js.coffee

      ---
      combine: true
      outPath: scripts/myScript.js
      write: false # prevents "Rename one of them to avoid an over-write" message
      ---
      ### coffeescript ###
      bar ->
    
  • out: scripts/myScript.js:

      function foo(){}
      
      /* coffeescript
      */
      
      bar(function() {});
    
npm install --save docpad-plugin-combiner
combiner:
    # default collection name
    collectionName: "combineOut"
    # default sort comparator
    comparator: [filename: 1]

For more info on the sort comparator see Query Engine Guide

Licensed under the incredibly permissive MIT License
Copyright © 2013+ [Stringz Solutions Ltd]
Copyright © 2013+ Peter Flannery