Tool that can be used to compile metal soy files.
$ npm install --global metal-tools-soy
$ metalsoy
You can see information about the available options by typing $ metalsoy --help
in the command line.
$ metalsoy --dest folderName
The directory where the compiled files will be stored.
$ metalsoy --externalMsgFormat format
Pattern that should be used to format the extracted external messages from compiled files.
$ metalsoy --help
Shows help information for all options, including default values.
$ 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.
$ metalsoy --skipMetalGeneration
Passing this will cause soy files to be just compiled, without the addition of metal generated code (like the component class).
$ 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.
$ metalsoy --src src/**/*.soy
The path globs to the soy files to be compiled.
$ metalsoy --version
Displays current version of metal-tools-soy.
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