See #1687. Add Docker executable support for Sass-convert beautifier
This commit is contained in:
parent
cdccc2f36b
commit
6aee12ba80
|
@ -334,6 +334,23 @@ Options for Rscript executable.
|
|||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*Rscript*" and change it to your desired configuration.
|
||||
|
||||
##### [SassConvert](#sassconvert)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Type**: `object`
|
||||
|
||||
**Description**:
|
||||
|
||||
Options for SassConvert executable.
|
||||
|
||||
**How to Configure**
|
||||
|
||||
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
|
||||
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
|
||||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*SassConvert*" and change it to your desired configuration.
|
||||
|
||||
##### [Uncrustify](#uncrustify)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
|
|
@ -4,7 +4,20 @@ Beautifier = require('./beautifier')
|
|||
module.exports = class SassConvert extends Beautifier
|
||||
name: "SassConvert"
|
||||
link: "http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax"
|
||||
isPreInstalled: false
|
||||
executables: [
|
||||
{
|
||||
name: "SassConvert"
|
||||
cmd: "sass-convert"
|
||||
homepage: "http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax"
|
||||
installation: "http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax"
|
||||
version: {
|
||||
parse: (text) -> text.match(/Sass (\d+\.\d+\.\d+)/)[1]
|
||||
}
|
||||
docker: {
|
||||
image: "unibeautify/sass-convert"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
options:
|
||||
# TODO: Add support for options
|
||||
|
@ -14,8 +27,7 @@ module.exports = class SassConvert extends Beautifier
|
|||
|
||||
beautify: (text, language, options, context) ->
|
||||
lang = language.toLowerCase()
|
||||
|
||||
@run("sass-convert", [
|
||||
@exe("sass-convert").run([
|
||||
@tempFile("input", text),
|
||||
"--from", lang, "--to", lang
|
||||
])
|
||||
|
|
|
@ -9306,6 +9306,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"sass-convert": {
|
||||
"key": "sass-convert",
|
||||
"title": "SassConvert",
|
||||
"type": "object",
|
||||
"collapsed": true,
|
||||
"description": "Options for SassConvert executable.",
|
||||
"properties": {
|
||||
"path": {
|
||||
"key": "path",
|
||||
"title": "Binary/Script Path",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Absolute path to the \"sass-convert\" executable's binary/script."
|
||||
}
|
||||
}
|
||||
},
|
||||
"rscript": {
|
||||
"key": "rscript",
|
||||
"title": "Rscript",
|
||||
|
|
Loading…
Reference in New Issue