# metal-tools-soy

> Tool that can be used to compile metal soy files

Latest version **4.3.2** (published 2019-02-27) · BSD license · 0 weekly downloads

## Install

```sh
npm install metal-tools-soy
pnpm add metal-tools-soy
yarn add metal-tools-soy
bun add metal-tools-soy
```

Provides the command `metalsoy`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.3.2 |
| Published | 2019-02-27 |
| First published | 2015-12-21 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12.0 |
| Dependencies | 13 |
| Unpacked size | 33.7 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Maira Bello |
| Maintainers | brunobasto, bryceosterhaus, carloslancha, diegonvs, eduardolundgren, jbalsas, julien, mairatma, matuzalemteles, rframpton, ygorcosta, zenorocha |
| Keywords | metal, soy |

## Links

- npm: https://www.npmjs.com/package/metal-tools-soy
- Repository: https://github.com/metal/metal-tools-soy
- Homepage: https://github.com/metal/metal-tools-soy#readme
- Issues: https://github.com/metal/metal-tools-soy/issues
- npm.io page: https://npm.io/package/metal-tools-soy

## Dependencies (13)

- [merge](https://npm.io/package/merge.md) ^1.2.0
- [yargs](https://npm.io/package/yargs.md) ^8.0.2
- [globby](https://npm.io/package/globby.md) ^6.1.0
- [gulp-if](https://npm.io/package/gulp-if.md) ^2.0.0
- [through2](https://npm.io/package/through2.md) ^2.0.5
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^2.2.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7
- [soyparser](https://npm.io/package/soyparser.md) ^1.0.3
- [gulp-ignore](https://npm.io/package/gulp-ignore.md) ^2.0.1
- [gulp-replace](https://npm.io/package/gulp-replace.md) ^0.5.4
- [gulp-wrapper](https://npm.io/package/gulp-wrapper.md) ^1.0.0
- [stream-consume](https://npm.io/package/stream-consume.md) ^0.1.0
- [stream-combiner](https://npm.io/package/stream-combiner.md) ^0.2.2

## Recent versions

- 4.3.2 (latest) — 2019-02-27
- 2.4.3 (prev) — 2016-09-19
- 4.3.1 — 2019-02-27
- 4.3.0 — 2019-02-27
- 6.0.0 — 2018-01-27
- 4.2.9 — 2017-12-12
- 5.0.0 — 2017-09-28
- 4.2.8 — 2017-09-27
- 4.2.7 — 2017-09-21
- 4.2.6 — 2017-07-24
- 4.2.5 — 2017-06-27
- 4.2.4 — 2017-06-27
- 4.2.3 — 2017-06-27
- 4.2.2 — 2017-06-16
- 4.2.1 — 2017-06-15
- … 36 more at https://npm.io/package/metal-tools-soy/versions

## README

# metal-tools-soy

[![Build Status](https://travis-ci.org/metal/metal-tools-soy.svg?branch=master)](https://travis-ci.org/metal/metal-tools-soy)

Tool that can be used to compile metal soy files.

## CLI

### Install

```sh
$ npm install --global metal-tools-soy
```

### Use

```sh
$ metalsoy
```

### Options

You can see information about the available options by typing `$ metalsoy --help` in the command line.

#### dest

```sh
$ metalsoy --dest folderName
```

The directory where the compiled files will be stored.

#### externalMsgFormat

```sh
$ metalsoy --externalMsgFormat format
```

Pattern that should be used to format the extracted external messages from compiled files.

#### help

```sh
$ metalsoy --help
```

Shows help information for all options, including default values.

#### outputDir

```sh
$ metalsoy --outputDir folderName
```

Temp directoy used to compile soy files.

Note: this option does not determine where the final `.soy.js` files are placed, see `--dest` option.

#### skipMetalGeneration

```sh
$ metalsoy --skipMetalGeneration
```

Passing this will cause soy files to be just compiled, without the addition of metal generated code (like the component class).

#### soyDeps

```sh
$ metalsoy --soyDeps node_modules/metal*/src/**/*.soy
```

Soy files that the main source files depend on, but that shouldn't be compiled. The soy compiler needs these files.

#### src

```sh
$ metalsoy --src src/**/*.soy
```

The path globs to the soy files to be compiled.

#### version

```sh
$ metalsoy --version
```

Displays current version of metal-tools-soy.

## SoyToIncrementalDomSrcCompiler

This project uses the `SoyToIncrementalDomSrcCompiler` to compile the soy files to metal using Incremental DOM. Since the compiler is not independently released, the process to update it in this project is as follows:

1. Clone the [https://github.com/google/closure-templates](google/closure-templates) repository
2. Update the `<version>` value inside `pom.xml` to the date of the latest commit that is going to get released using `yyyy-mm-dd` as the date format
3. Run `mvn install` on the root folder
4. Copy the generated file from `~/.m2/repository/com/google/template/soy/{version}/soy-{version}-SoyToIncrementalDomSrcCompiler.jar` to the `jar` folder in this project

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