Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create block separately #16

Closed
bigslycat opened this issue Aug 9, 2016 · 0 comments
Closed

Create block separately #16

bigslycat opened this issue Aug 9, 2016 · 0 comments
Labels
Milestone

Comments

@bigslycat
Copy link
Owner

bigslycat commented Aug 9, 2016

const pug = require('pug');
const pbem = require('pbem');

const scope = pbem({
  blocksDir: __dirname + 'views/blocks'
}).precompile();

const separateTemplate = pug.compileFile(__dirname + 'views/page.pug');

let renderedSeparateTemplate = separateTemplate({
  block: scope.createBlock
});
@bigslycat bigslycat added this to the v2.3.0 milestone Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant