Webstorm 安装less

jianfly.com 2019-01-31 1658次浏览

1.安装nodejs

2.打开cmd,输入“cd C:\Program Files\nodejs”,回车,进入nodejs目录,输入npm install less -g,回车

3.

打开webstorm的设置

设置external tool

tools – external tool – 点击“+”

Tool settings,下面的地址可以直接复制并粘贴到自己设置里,然后把用户名“a”改成自己的

Programs,C:\Program Files\nodejs\node.exe

Paramenters,C:\Users\xihe\AppData\Roaming\npm\node_modules\less\bin\lessc$FilePath$ $FileDir$\$FileNameWithoutExtension$.css

4.

设置filewatchers

添加一个watcher,watcher settings

program,C:\Users\xihe\AppData\Roaming\npm\lessc.cmd

arguments,–no-color $FileName$

Outputpaths to refresh,$FileNameWithoutExtension$.css