Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions lib/SoyCompiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var SoyVmContext = require('./SoyVmContext')
var EventEmitter = require('events').EventEmitter
var child_process = require('child_process')
var exec = child_process.exec
var closureTemplates = require('closure-templates')
var fs = require('fs')
var path = require('path')

Expand All @@ -17,13 +16,6 @@ var path = require('path')
var DEFAULT_VM_CONTEXT = 'default'


/**
* Resolved path to the executable jar for the Closure Template compiler.
* @type {string}
*/
var PATH_TO_SOY_JAR = closureTemplates['SoyToJsSrcCompiler.jar']


/**
* The main public API of soynode.
* @constructor
Expand Down Expand Up @@ -205,7 +197,7 @@ SoyCompiler.prototype._compileTemplateFilesAndEmit = function (inputDir, files,

// Arguments for running the soy compiler via java.
var args = [
'-classpath', [ PATH_TO_SOY_JAR ].concat(options.classpath).join(path.delimiter),
'-classpath', [ options.jarPath ].concat(options.classpath).join(path.delimiter),
'com.google.template.soy.SoyToJsSrcCompiler',
'--codeStyle', 'concat',
'--shouldGenerateJsdoc',
Expand Down
7 changes: 7 additions & 0 deletions lib/SoyOptions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2014. A Medium Corporation.

var path = require('path')
var closureTemplates = require('closure-templates')

/**
* Describes the possible options set to a SoyCompiler.
Expand Down Expand Up @@ -128,6 +129,12 @@ function SoyOptions() {
* @type {boolean}
*/
this.isUsingIjData = false

/**
* Resolved path to the executable jar for the Closure Template compiler. Defaults to using the bundled SoyToJsSrcCompiler.jar file.
* @type {string}
*/
this.jarPath = closureTemplates['SoyToJsSrcCompiler.jar']
}


Expand Down