我是phpStorm的新手。我正在尝试将SCSS编译文件(css输出)存储在根目录中,而不是与scss文件位于同一文件夹中。我很困惑如何传递参数。我试图传递参数:css_location
和:style
。有人能举个例子吗?我现在只有默认参数:
--no-cache --update $FileName$:$FileNameWithoutExtension$.css
更新:
经过多次阅读,我得到了这个:
--no-cache --update $FileName$:$FileDirPathFromParent$/$FileNameWithoutExtension$.css --trace
但是,我收到了一个拒绝权限的错误:
/usr/bin/scss sudo --no-cache --update style.scss:/style.css --trace
error No such file or directory - sudo
/Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:512:in `initialize': Permission denied - /style.css (Errno::EACCES)
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:512:in `open'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:512:in `write_file'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:501:in `update_stylesheet'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:215:in `block in update_stylesheets'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:209:in `each'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin/compiler.rb:209:in `update_stylesheets'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/plugin.rb:82:in `update_stylesheets'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/exec/sass_scss.rb:329:in `watch_or_update'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/exec/sass_scss.rb:50:in `process_result'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/exec/base.rb:40:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/lib/sass/exec/base.rb:19:in `parse!'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.2/bin/scss:13:in `<top (required)>'
from /usr/bin/scss:23:in `load'
from /usr/bin/scss:23:in `<main>'
更新:
好的,我无法弄清楚这些设置。我附上了一个屏幕截图。我想要完成的是让style.css文件显示在根目录而不是css文件夹中。
答案 0 :(得分:3)
如果'root'是项目根目录,我建议使用以下设置:
Arguments: --no-cache --update $FileName$:$ProjectFileDir$/$FileNameWithoutExtension$.css
Working dir: $FileDir$
Output paths to refresh: $ProjectFileDir$/$FileNameWithoutExtension$.css
它对你有用吗?