2014-09-08 15:50:54 -06:00
|
|
|
###
|
|
|
|
Requires https://github.com/hhatto/autopep8
|
|
|
|
###
|
|
|
|
"use strict"
|
|
|
|
cliBeautify = require("./cli-beautify")
|
|
|
|
getCmd = (inputPath, outputPath, options) ->
|
2015-03-12 10:33:27 -06:00
|
|
|
htmlBeautifierPath = options.htmlbeautifier_path # jshint ignore: line
|
|
|
|
|
|
|
|
cmd = "< \"" + inputPath + "\" > \"" + outputPath + "\""
|
|
|
|
if htmlBeautifierPath
|
|
|
|
# Use absolute path
|
|
|
|
"\"#{htmlBeautifierPath}\" #{cmd}"
|
|
|
|
else
|
|
|
|
# Use command available in $PATH
|
|
|
|
"htmlbeautifier #{cmd}"
|
|
|
|
|
2014-09-08 15:50:54 -06:00
|
|
|
module.exports = cliBeautify(getCmd)
|