• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

pug-autocompile

Compile Pug files to HTML
  • #autocompile
  • #compile
  • #dopustim
  • #html
  • #pug
DopustimVladimir
1,485
0
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

Pug Autocompile plugin for Atom

apm Deps Travis AppVeyor

GitHub tag GitHub stars GitHub issues

License

This plugin allows you easy compile Pug files to HTML with options.

Atom Package: https://atom.io/packages/pug-autocompile

Installation

From Atom: Settings ➔ Install ➔ Search for pug-autocompile

You can also install this plugin via command line:

$ apm install pug-autocompile

Usage

Compile from Selection

gif

Options Line

gif

Plugin Settings

gif

Keymaps

Windows / Linux

  • Push Ctrl+ Shift+ C then D to compile from current selection
  • Push Ctrl+ Shift+ C then F to compile current file

macOS

  • Push Cmd+ Shift+ C then D to compile from current selection
  • Push Cmd+ Shift+ C then F to compile current file

Options

Add the parameters on the first line of your Pug file. Your output file will be minified (default behaviour). Always start line with comment // and separate options by comma , .

  • out: path/to/output.html — path to your rendered HTML-file
  • main: path/to/main.pug — path to your main / parent Pug-file to be compiled
  • pretty: true — make your HTML pretty
  • compress: false — make your HTML pretty

Examples

index.pug

// out: build/index.html, pretty: true
doctype html
html
    include includes/head.pug
    body
        h1 Hello from Pug :)

includes/head.pug

// main: ../index.pug
head
    title Pug Autocompile plugin for Atom
    link(href='/assets/css/main.css')

build/index.html

<!DOCTYPE html>
<html>
 
    <head>
        <title>Pug Autocompile plugin for Atom</title>
        <link href="/assets/css/main.css">
    </head>
 
    <body>
        <h1>Hello from Pug :)</h1>
    </body>
 
</html>

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by