New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wrap-html

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wrap-html

Wraps one html file in another html file. Like an html pig in a html blanket.

  • 0.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-93.33%
Maintainers
1
Weekly downloads
 
Created
Source

wrap-html

A lightweight command line utility to wrap html files in a common layout.

Install

npm install wrap-html

Use

Use the cli by passing in a directory of html files to process. Optionally pass in an output directory, and a template to use.

Recommended to use with npm scripts like so:

  "scripts": {
	"wrap-html": "wrap-html sourceDir -o buildDir -t templateFile.html"
  }

Then you can use npm run wrap-html to build everything.

Wraps html in another html file.
Usage: wrap-html [source dir] [options]

Options:
  -o, --output    Output directory
  -t, --template  template html file
  -d, --debug     log all files built
  -h, --help      Show help

Examples:
  wrap-html source -t template.html -o        wrap all files in ./source inside
  build                                       template.html and save them in
                                              the build folder

Templates

The template html file (the one that will be wrapped around all of the other files) needs to have {{ content }} in the file. For example, to wrap all the html files in a basic html skeleton, you could use:

<!DOCTYPE html>
  <head>
    <title>Layers</title>
  </head>
  <body>
    {{ content }}
  </body>
</html>

** Note: the layout is assumed to be inside your source directory. **

Defaults

optiondefault
source'source'
output'build'
template'layout.html'
debugfalse

Keywords

FAQs

Package last updated on 02 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc