Tool that can be used to compile metal soy files.
$ npm install --global metal-tools-soy$ metalsoyYou can see information about the available options by typing $ metalsoy --help in the command line.
$ metalsoy --dest folderNameThe directory where the compiled files will be stored.
$ metalsoy --externalMsgFormat formatPattern that should be used to format the extracted external messages from compiled files.
$ metalsoy --helpShows help information for all options, including default values.
$ metalsoy --outputDir folderNameTemp directoy used to compile soy files.
Note: this option does not determine where the final .soy.js files are placed, see --dest option.
$ metalsoy --skipMetalGenerationPassing 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/**/*.soySoy files that the main source files depend on, but that shouldn't be compiled. The soy compiler needs these files.
$ metalsoy --src src/**/*.soyThe path globs to the soy files to be compiled.
$ metalsoy --versionDisplays 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.xmlto the date of the latest commit that is going to get released usingyyyy-mm-ddas the date format - Run
mvn installon the root folder - Copy the generated file from
~/.m2/repository/com/google/template/soy/{version}/soy-{version}-SoyToIncrementalDomSrcCompiler.jarto thejarfolder in this project