# template-config

> Adds declarative configuration functionality to Template.

Latest version **0.1.2** (published 2015-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install template-config
pnpm add template-config
yarn add template-config
bun add template-config
```

## 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.1.2 |
| Published | 2015-08-19 |
| First published | 2015-08-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | assemble, boilerplate, config, configuration, docs, document, documentation, generate, scaffold, site, snippet, static, template, verb |

## Links

- npm: https://www.npmjs.com/package/template-config
- Repository: https://github.com/jonschlinkert/template-config
- Issues: https://github.com/jonschlinkert/template-config/issues
- npm.io page: https://npm.io/package/template-config

## Dependencies (2)

- [easy-renamer](https://npm.io/package/easy-renamer.md) ^0.2.0
- [extend-shallow](https://npm.io/package/extend-shallow.md) ^2.0.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2015-08-19
- 0.1.0 — 2015-08-10

## README

# template-config [![NPM version](https://badge.fury.io/js/template-config.svg)](http://badge.fury.io/js/template-config)

> Adds declarative configuration functionality to Template.

## Install

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i template-config --save
```

Note that some of

## Usage

In the following example, `app` represents the latest version of any template.js-based application, like assemble, verb, scaffold, boilerplate, etc. [See the implementation table](#implementation-table) for details.

```js
var config = require('template-config');
var app = require('template');

// add a `config` method to `app`
app.mixin('config', config);

// the following config will automatically create the
// specified template collections, and load files from
// the provided directories based on the glob patterns
app.config({
  base: 'fixtures/templates',
  renameKey: function (key) {
    return path.basename(key, path.extname(key));
  },
  templates: {
    pages: {
      base: 'pages',
      patterns: '*.hbs',
      options: {},
    },
    posts: {
      base: 'posts',
      patterns: '*.md',
      options: {},
    },
    layouts: {
      base: 'layouts',
      patterns: '*.hbs',
      options: { viewType: 'layout' },
    },
    includes: {
      base: 'includes',
      patterns: '*.hbs',
      options: { viewType: 'partial' },
    }
  }
});
```

## Implementation table

When the application is checked, it's stable and ready to use with this library:

* [ ] snippet
* [ ] template
* [ ] scaffold
* [ ] boilerplate
* [ ] assemble
* [ ] generate
* [ ] verb

## Related projects

* [assemble](http://assemble.io): Static site generator for Grunt.js, Yeoman and Node.js. Used by Zurb Foundation, Zurb Ink, H5BP/Effeckt,… [more](http://assemble.io)
* [boilerplate](https://github.com/jonschlinkert/boilerplate): Easily create, share and use boilerplates for node.js and web projects.
* [generate](https://github.com/generate/generate): Project generator, for node.js.
* [snippet](https://github.com/jonschlinkert/snippet): CLI and API for easily creating, reusing, sharing and generating snippets of code from the… [more](https://github.com/jonschlinkert/snippet)
* [scaffold](https://github.com/jonschlinkert/scaffold): Generate a project or files from scaffolds.
* [template](https://github.com/jonschlinkert/template): Render templates using any engine. Supports, layouts, pages, partials and custom template types. Use template… [more](https://github.com/jonschlinkert/template)
* [verb](https://github.com/assemble/verb): Documentation generator for GitHub projects. Extremely powerful, easy to use, can generate anything from API… [more](https://github.com/assemble/verb)

## Running tests

Install dev dependencies:

```sh
$ npm i -d && npm test
```

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/template-config/issues/new)

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License

Copyright © 2015 Jon Schlinkert
Released under the MIT license.

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 19, 2015._

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