Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tmslnz/gulp-phug

Pug (Jade) to PHP template compiler using Tale-Jade
https://github.com/tmslnz/gulp-phug

gulp gulp-plugin gulpjs jade jade-template-engine pug pug-template-engine

Last synced: 4 days ago
JSON representation

Pug (Jade) to PHP template compiler using Tale-Jade

Awesome Lists containing this project

README

        

[![npm](https://img.shields.io/npm/v/gulp-phug.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/gulp-phug)

# Gulp Phug

_(Formerly [`gulp-tale-jade`](https://www.npmjs.com/package/gulp-tale-jade))_

Gulp plugin for [Phug](https://github.com/phug-php/phug).

## Example usage

```js
const gulp = require( 'gulp' );
const pug = require('gulp-phug');

function templates () {
return gulp.src('./src/*.pug')
.pipe(pug())
.pipe(gulp.dest('./dist'))
}

module.exports = {
default: templates
};
```

## Development Setup

Uses `composer` which can be installed via Homebrew with `brew install composer`.

## Using with WordPress

1. Install [`composer`](https://getcomposer.org) (PHP's package manager) on your system;
2. Create a folder `mu-plugins` inside `wp-content`;
3. Create a folder `phug-renderer` inside `mu-plugins/`;
4. Install [`phug`](https://packagist.org/packages/phug/phug);
5. Create a file called `init.php` inside `mu-plugins`, with the following content:

```php