Skip to content

Releases: posthtml/gulp-posthtml

v3.0.5

Choose a tag to compare

@Scrum Scrum released this 26 Jun 08:14

Fix

  • fix: Improve emitting errors and show stack 253a944

v3.0.4...v3.0.5

v3.0.4

Choose a tag to compare

@michael-ciniawsky michael-ciniawsky released this 23 Jan 17:51

v3.0.3

Choose a tag to compare

@michael-ciniawsky michael-ciniawsky released this 23 Jan 17:50

v3.0.2

Choose a tag to compare

@michael-ciniawsky michael-ciniawsky released this 23 Jan 17:50
v3.0.2

v3.0.1

Choose a tag to compare

@michael-ciniawsky michael-ciniawsky released this 23 Jan 17:50
f4d117b
v3.0.1

v3.0.0

Choose a tag to compare

@michael-ciniawsky michael-ciniawsky released this 11 Mar 05:52

Features

  • index: add config callback (bdda211)

v2.0.0

Choose a tag to compare

@michael-ciniawsky michael-ciniawsky released this 15 Nov 11:34

Chore

  • Update dotfiles

Docs

  • Update README.md
  • Update INDEX.md (JSDoc)

Tests

  • Add tests

Features

Its is now possible to use one of posthtml's cutom parsers posthtml-pug / posthtml-sugarml with gulp-posthtml.

Secondly gulp-posthtml now supports the 'common' config approach via a config file (posthtml.config.js) and will autoload it when present. Config loading is relative to the current file (directory) processed by gulp-posthtml. It continues searching for configs upwards until the project root is reached. For advanced usage placing different config files downwards is possible and the nearest config file found will be loaded and used by gulp-posthtml.

gulp-posthtml also adds the follow props to the config context ctx

ctx.env === process.env.NODE_ENV // Default === 'development' 
ctx.dir === dirname(file.path)   // File Directory
ctx.ext === extname(file.path)   // File Extension

posthtml.config.js

module.exports = (ctx) => {
  return {
    parser: ctx.ext === '.sml'  ? 'posthtml-sugarml' : false 
    plugins: {
      'posthtml-include': { root: ctx.dir },
      'htmlnano': ctx.env === 'production' ? {} : false 
    }
  }
}

For more information about posthtml.config.js, see posthtml-load-config

v1.5.2

Choose a tag to compare

@voischev voischev released this 24 Nov 09:34

— Update posthtml to 0.8.0

v1.5.1

Choose a tag to compare

@voischev voischev released this 27 Oct 13:48
Release 1.5.1

v1.5.0

Choose a tag to compare

@voischev voischev released this 21 Oct 19:40

— Update posthtml to 0.7.0