Module: MultiScript
- Defined in:
- lib/multiscript.rb,
lib/multiscript/version.rb,
lib/multiscript/packager.rb,
lib/multiscript/compilers.rb
Defined Under Namespace
Classes: CoffeeCompiler, Packager
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
Class Method Details
.compress(params) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/multiscript.rb', line 7 def compress(params) packages = get_packages(params) codez = packages_to_string(packages) if params[:minify] codez = minify codez end unless params[:out_type] params[:out_type] = 'string' end if params[:out_type] == 'file' || params[:out_type] == 'dir' params[:out_folder] ||= 'source.js' write_file(codez, params[:out_folder], params[:out_file]) else return codez end end |