Z
Z
ZaxapKramer2017-05-05 20:19:43
HTML
ZaxapKramer, 2017-05-05 20:19:43

How to compile Pug to static HTML using Brunch?

Hello. I've been trying to set up Brunch to compile *. pug to *. html . The static does not come out in any way ... Tell me, please.статичный

brunch-config.js
exports.files = {
  templates: {
    defaultExtension: 'pug',
    joinTo: {
      'index.html': 'app/assets/index.pug',
    }
  }
};

exports.plugins = {
  on: [
    'pugjs-brunch'
  ],
  pug: {
    doctype: 'html',
    basedir: 'app',
    staticBasedir: 'app/assets',
    staticPretty: true,
    inlineRuntimeFunctions: false,
    compileDebug: false,
    sourceMap: false
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
ZaxapKramer, 2017-05-07
@ZaxapKramer

I ended up using pug-brunch-static .
And about pug js -brunch :
I thought that

here
Static: Plain HTML files from pug templates in the assets directory
it was said about the possibility of compiling *.pug-templates into static html-files... but, apparently, they misunderstood their English or, nevertheless, could not set them up.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question