Sha256: 3f7c39a4adb2b2db8ab4dc430e77e7430716b5e44e1d0b6dd7b1771d1542f6ce
Contents?: true
Size: 1.5 KB
Versions: 4
Compression:
Stored size: 1.5 KB
Contents
<% # Closure Compiler is run from a Script. To obtain # the dynamically generated javascript from this file: # http://localhost:8080/hello/compiler.js # These are the same options as compiler.jar. Two exceptions: # 1. No --compilation_level will load the original sources # instead of using the compiler.jar default. # 2. The --ns argument compiles a namespace. Closure Script simply # turns these into --js arguments before calling the compiler. args = %w{ --summary_detail_level 3 --ns myapp.hello } # You can make as many compiler Scripts as you like but # it may be more convenient to accept options on the URL. # http://localhost:8080/hello/compiler.js?build # http://localhost:8080/hello/compiler.js?debug args += case query_string when 'build' then %w{ --compilation_level ADVANCED_OPTIMIZATIONS --js_output_file compiler_build.js --create_source_map compiler_build.map } when 'debug' then %w{ --debug true --formatting PRETTY_PRINT --compilation_level ADVANCED_OPTIMIZATIONS --js_output_file compiler_debug.js } else;[];end # This will process all .soy files into .js files. # Be careful you don't make a file.soy to go with the # file.js you just started, it will overwrite file.js. # Touching any .soy file will trigger a recompile. goog.soy_to_js %w{ --cssHandlingScheme goog --shouldGenerateJsdoc --shouldProvideRequireSoyNamespaces --outputPathFormat {INPUT_DIRECTORY}{INPUT_FILE_NAME_NO_EXT}.js **/*.soy } # Compile the javascript. @response = goog.compile(args).to_response %>
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
closure-1.4.3 | scripts/hello/compiler.js.erb |
closure-1.4.2 | scripts/hello/compiler.js.erb |
closure-1.3.1 | scripts/hello/compiler.js.erb |
closure-1.3.0 | scripts/hello/compiler.js.erb |