Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dopl

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dopl

Use dopl to make a new directory based on a template directory. Processes each file through mustache and provides filename template strings.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
increased by90%
Maintainers
1
Weekly downloads
 
Created
Source

dopl

Use dopl to make a new directory based on a template directory. Processes each file through mustache and provides filename template strings.

Example

const dopl = require('dopl');

dopl({
  name: 'heading',
  src: 'templates/simple-component',
  output: 'source', 
  data: {
    timestamp: +new Date()
  }
})
.then(() => {
  console.log(`${name} created!`);
});

Options

name –– name of new directory

src –– directory to use as a template

output –– directory to output copy

data –– data to pass into mustache

render –– function with the form fn(file, data) for rendering files, if you'd like to replace mustache with another templating engine.

Filename Interpolation

Filenames with [name] included will be replaced with name option.

// config
dopl({
    name: 'mega',
    output: 'dist'
})

// input file
[name].html
assets/[name].css

// output file
dist/mega.html
dist/assets/mega.css

Install

npm install dopl

CLI

npm install dopl -g
dopl --src templates/original --output source/directory new-copy

License

MIT 2016 Evan Krambuhl

FAQs

Package last updated on 09 Dec 2016

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