Skip to content

Releases: posthtml/gulp-posthtml

v3.0.5

26 Jun 08:14
Compare
Choose a tag to compare

Fix

  • fix: Improve emitting errors and show stack 253a944

v3.0.4...v3.0.5

v3.0.4

23 Jan 17:51
Compare
Choose a tag to compare

v3.0.3

23 Jan 17:50
Compare
Choose a tag to compare

v3.0.2

23 Jan 17:50
Compare
Choose a tag to compare
v3.0.2

v3.0.1

23 Jan 17:50
f4d117b
Compare
Choose a tag to compare
v3.0.1

v3.0.0

11 Mar 05:52
Compare
Choose a tag to compare

Features

  • index: add config callback (bdda211)

v2.0.0

15 Nov 11:34
Compare
Choose a tag to compare

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

24 Nov 09:34
Compare
Choose a tag to compare

— Update posthtml to 0.8.0

v1.5.1

27 Oct 13:48
Compare
Choose a tag to compare
Release 1.5.1

v1.5.0

21 Oct 19:40
Compare
Choose a tag to compare

— Update posthtml to 0.7.0