KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
pug-beautify
★ 20
Open GitHub ↗
Pug(former jade) beautify
Download README (.md)
Explore Similar Repositories
SimpleCEFDLL
:
Simple CEF( Chromium Embedded Framework ) DLL
raccoon-plugin
:
With Raccoon, use a JSON or YAML file to manage WordPress theme features
ng2
:
angular2 demo
realm-recyclerview-lite
:
A RecyclerView for Realm data which supports swiping, drag-and-drop, fast scrolling, and multi-select
wp-router
:
[WordPress Plugin] WP Router
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
pug-beautify
?
Download (.md)
# Pug(former jade) beautify This tiny program format a pug(former jade) template file. For reusability, it's made as a module suggested by [@Glavin001](https://github.com/Glavin001). Please refer [this issue](https://github.com/vingorius/jade-beautify/issues/7). ## Installation ```shell npm install pug-beautify ``` ## Test ```shell npm run test ``` ### Options * fill_tab - boolean, fill whether tab or space, default true. * omit_div - boolean, whether omit 'div' tag, default false. * tab_size - number, when 'fill_tab' is false, fill 'tab_size' spaces, default 4. * separator_space - boolean, When 'separator_space' is true, the attribute separator is comma, default true. * omit_empty_lines - When 'separator_space' is false, delete line blank, default true. ## How to use ```javascript var output = pugBeautify(code); ``` ```javascript var output = pugBeautify(code,{ fill_tab:true, omit_div:false, tab_size:4, separator_space:true, }); ``` ## Example code ```javascript var fs = require('fs'); var pugBeautify = require('pug-beautify'); var code = fs.readFileSync('sample.jade','utf8'); var option = { fill_tab: true, omit_div: false, tab_size: 4, separator_space: true }; try { var output = pugBeautify(code,option); }catch(error){ // Error occurred } ``` ## Todo