0.0.5 • Published 6 years ago

pug-filter-ctp v0.0.5

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

pug-filter-ctp

What it does

pug-filter-ctp provides pug ctp(cake) filter!
It is also possible to output PHP Syntax with option specification.

:ctp
  $title
:ctp(php)
  echo $title;

Renders:

<?= $title ?>
<?php echo $title; ?>

How to use

Example:

var gulp = require('gulp'),
    pug  = require('gulp-pug'),
    pugCtpFilter = require('pug-filter-ctp');

gulp.task('pug', () => {
  return gulp.src(['./pug/**/*.pug', '!./pug/**/_*.pug'])
    .pipe(pug({
      filters: {
        ctp: pugCtpFilter
      },
      pretty: true
    }))
    .pipe(gulp.dest('./html/'));
});
0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago