From 84d5df11ef479efc6ab86df38420e9ff73afc68b Mon Sep 17 00:00:00 2001 From: Anton Kovalyov Date: Fri, 20 Jan 2017 15:36:22 -0800 Subject: [PATCH] Updated soynode with new closure-templates and closure-library deps --- lib/SoyCompiler.js | 7 +++---- lib/SoyOptions.js | 6 +++--- package.json | 6 +++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/SoyCompiler.js b/lib/SoyCompiler.js index 38d08d0..002b108 100644 --- a/lib/SoyCompiler.js +++ b/lib/SoyCompiler.js @@ -229,7 +229,6 @@ SoyCompiler.prototype._compileTemplateFilesAsync = function (inputDir, outputDir var args = [ '-classpath', [ PATH_TO_SOY_JAR ].concat(options.classpath).join(path.delimiter), 'com.google.template.soy.SoyToJsSrcCompiler', - '--codeStyle', 'concat', '--shouldGenerateJsdoc' ] @@ -268,9 +267,9 @@ SoyCompiler.prototype._compileTemplateFilesAsync = function (inputDir, outputDir args.push('--shouldDeclareTopLevelNamespaces', 'false') } - // Always turn on isUsingIjData. - // https://groups.google.com/forum/#!topic/closure-templates-discuss/8rxD9I0QrtI - args.push('--isUsingIjData') + if (options.protoFileDescriptors) { + args.push('--protoFileDescriptors', options.protoFileDescriptors) + } args.push('--outputPathFormat', outputPathFormat) diff --git a/lib/SoyOptions.js b/lib/SoyOptions.js index 5793450..91b8b9b 100644 --- a/lib/SoyOptions.js +++ b/lib/SoyOptions.js @@ -159,10 +159,10 @@ function SoyOptions() { this.shouldDeclareTopLevelNamespaces = true /** - * Indicates that $ij variables are used and should be passed between templates. - * @type {boolean} + * Points to a directory with proto files + * @type {string} */ - this.isUsingIjData = false + this.protoFileDescriptors = '' } diff --git a/package.json b/package.json index ceeeadd..3046a2d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "soynode", - "version" : "2.0.1", + "version" : "2.1.0", "description" : "Utility for working with Closure Templates, aka Soy, from within a node.js application.", "keywords" : ["node", "soy", "templates", "closure"], "repository" : { @@ -16,9 +16,9 @@ "main" : "./lib/soynode.js", "directories": {"lib": "./lib"}, "dependencies": { - "closure-templates": "^20151008.0.0", + "closure-templates": "^20160825.0.0", "fs-extra": "1.0.0", - "obvious-closure-library": "^20151008.0.0", + "obvious-closure-library": "^20161024.0.0", "q": "1.4.1" }, "devDependencies": {