plushtml

0.1.0 • Public • Published

PLUSHTML <*>

Plushtml is not a linter. It's an automated tool that reads a custom structure and prints out a standard HTML5 one. Plushtml allows you to write the following document structure :

<!DOCTYPE html>
<html>
    <head>
     <!-- Assets best written here -->
     <header>
     <title></title>
     </header>
    </head>
 
    <body><!-- Content best written here --></body>
 
    <foot>
     <footer></footer>
     <!-- Scripts best written here -->
    </foot>
</html>

Plushtml doesn't care about the details of your code. It will try to print out your code structure as follows :

<!DOCTYPE html>
<html>
    <head>
     <!-- Assets best written here -->
    </head>
 
    <body>
     <header>
     <h1></h1>
     </header>
 
     <!-- Content best written here -->
 
     <footer></footer>
 
     <!-- Scripts best written here -->
    </body>
 
</html>

Install

npm install plushtml

Example usage

const fs = require('fs');
const plushtml = require('plushtml');

fs.readFile('/path/to/input.html', 'utf8', function (err, html) {
  if (err) throw err;
    fs.writeFile('/path/to/output.html', plushtml(html), 'utf8', function (err) {
      if (err) throw err;
    });
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    0
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i plushtml

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

18.6 kB

Total Files

14

Last publish

Collaborators

  • kittender