# @walery/serverless-plugin-stencil

> Serverless plugin for templating content in serverless.yml files

Latest version **0.0.7** (published 2023-08-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @walery/serverless-plugin-stencil
pnpm add @walery/serverless-plugin-stencil
yarn add @walery/serverless-plugin-stencil
bun add @walery/serverless-plugin-stencil
```

## 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.0.7 |
| Published | 2023-08-10 |
| First published | 2022-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Walery Strauch |
| Maintainers | walery |

## Links

- npm: https://www.npmjs.com/package/@walery/serverless-plugin-stencil
- Repository: https://github.com/walery/serverless-plugin-stencil
- Homepage: https://github.com/walery/serverless-plugin-stencil#readme
- Issues: https://github.com/walery/serverless-plugin-stencil/issues
- npm.io page: https://npm.io/package/@walery/serverless-plugin-stencil

## Dependencies (3)

- [find-plugins](https://npm.io/package/find-plugins.md) 1.1.7
- [@walery/stencil-product-bucket](https://npm.io/package/@walery/stencil-product-bucket.md) 0.0.4
- [@walery/stencil-aws-account-resolver](https://npm.io/package/@walery/stencil-aws-account-resolver.md) 0.0.4

## Recent versions

- 0.0.7 (latest) — 2023-08-10
- 0.0.6 — 2023-02-28
- 0.0.5 — 2022-12-06
- 0.0.4 — 2022-05-25
- 0.0.3 — 2022-05-23
- 0.0.2 — 2022-05-19
- 0.0.1 — 2022-05-18

## README

# serverless-plugin-stencil

Serverless plugin for templating content in serverless.yml files.

## Usage

serverless-plugin-stencil is a serverless plugin that can load templates into a serverless.yml file.
To make it possible you need to create a npm module that is marked as stencil module.
This can be done by adding _@walery/serverless-plugin-stencil_ property to the package.json file:

```js
{
  // ...

  "@walery/serverless-plugin-stencil": {
    "alias": "account"
  }
}
```

The _alias_ property is the only one you can add.
This property is mandatory and can't be omit.
The _alias_ property contains value of _stencilAlias_ that must be unique.

Once this module is created and added as dependency, the _serverless-plugin-stencil_ will be able to find it.

To use it in your serverless.yml file you need to do it in that way:

```yml
foo: ${stencil(<stencilAlias>):<blockName>}
```

The _blockName_ is the second part that is also mandatory.

In the stencil module you need to add _blocks_ directory on the root.
In this directory you can add yaml, yml, or js files.
The filename is interpreted as a _blockName_.

If the file is yaml or yml file then the content will be just added.
If the file is a js file then the _resolve_ function will be called.
The return value will be added to the serverless.yml file.

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