# dopl

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

Latest version **0.2.0** (published 2016-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install dopl
pnpm add dopl
yarn add dopl
bun add dopl
```

Provides the command `dopl`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2016-12-09 |
| First published | 2016-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Evan Krambuhl |
| Maintainers | krambuhl |

## Links

- npm: https://www.npmjs.com/package/dopl
- Repository: https://github.com/krambuhl/dopl
- Homepage: https://github.com/krambuhl/dopl#readme
- Issues: https://github.com/krambuhl/dopl/issues
- npm.io page: https://npm.io/package/dopl

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) ^7.1.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [mustache](https://npm.io/package/mustache.md) ^2.2.1
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [fs-readfile-promise](https://npm.io/package/fs-readfile-promise.md) ^3.0.0
- [fs-writefile-promise](https://npm.io/package/fs-writefile-promise.md) ^1.0.3

## Recent versions

- 0.2.0 (latest) — 2016-12-09
- 0.1.0 — 2016-10-30

## README

# dopl

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


## Example

```js
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
npm install dopl
```


## CLI

```npm
npm install dopl -g
```

```
dopl --src templates/original --output source/directory new-copy
```


## License

MIT 2016 Evan Krambuhl

---
_Source: https://npm.io/package/dopl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
