metal-tools-soy
v4.3.2
Published
Tool that can be used to compile metal soy files
Downloads
1,605
Readme
metal-tools-soy
Tool that can be used to compile metal soy files.
CLI
Install
$ npm install --global metal-tools-soy
Use
$ metalsoy
Options
You can see information about the available options by typing $ metalsoy --help
in the command line.
dest
$ metalsoy --dest folderName
The directory where the compiled files will be stored.
externalMsgFormat
$ metalsoy --externalMsgFormat format
Pattern that should be used to format the extracted external messages from compiled files.
help
$ metalsoy --help
Shows help information for all options, including default values.
outputDir
$ 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
$ metalsoy --skipMetalGeneration
Passing this will cause soy files to be just compiled, without the addition of metal generated code (like the component class).
soyDeps
$ 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
$ metalsoy --src src/**/*.soy
The path globs to the soy files to be compiled.
version
$ 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:
- Clone the https://github.com/google/closure-templates repository
- Update the
<version>
value insidepom.xml
to the date of the latest commit that is going to get released usingyyyy-mm-dd
as the date format - Run
mvn install
on the root folder - Copy the generated file from
~/.m2/repository/com/google/template/soy/{version}/soy-{version}-SoyToIncrementalDomSrcCompiler.jar
to thejar
folder in this project