Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johannesfischer/sourcejs-pug
https://github.com/johannesfischer/sourcejs-pug
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/johannesfischer/sourcejs-pug
- Owner: JohannesFischer
- License: mit
- Created: 2017-01-13T05:55:29.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-23T08:24:18.000Z (almost 8 years ago)
- Last Synced: 2024-09-25T21:43:50.025Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pug support for SourceJS
===============[![Greenkeeper badge](https://badges.greenkeeper.io/JohannesFischer/sourcejs-pug.svg)](https://greenkeeper.io/)
[SourceJS](http://sourcejs.com) middleware to support [Pug](https://pugjs.org/) markup language (`*.pug`) instead of native `*.src`.
Works with SourceJS v.0.5.6+.
## Install
To install, run npm in `sourcejs/user` folder:
```
npm install sourcejs-pug --save
```Then add `index.pug` to the list of spec files in your user options file.
```javascript
// Page rendering configuration (redefinable from context options)
rendering: {
// Define priority of spec file source
specFiles: [
'index.src',
'index.src.html',
'index.jade', // https://www.npmjs.com/package/sourcejs-jade
'index.pug', // https://www.npmjs.com/package/sourcejs-pug
'index.jsx', // https://www.npmjs.com/package/sourcejs-react
'index.md',
'readme.md',
'README.md',
'index.html'
],
},
```Then restart your SourceJS application, middleware will be loaded automatically.
## Usage
After installing middleware, instead of `index.src` pages, you can `index.pug` files with Pug markup.
index.pug
```
h1 Pug - node template engine#container.col
p.
Pug is a terse and simple
templating language with a
strong focus on performance
and powerful features.
```