Webstorm with less, but to compile the words need NODEJS environment. First go to Node's home page to download the corresponding version of Nodejs and then install, download address: http://nodejs.org/After installation, open a command prompt (win+r), enter node-v and Npm-v if the return version number indicates that you installed successfully. Next you can install less, command prompt NPM enters NPM Manager, then NPM install less starts downloading less, the default installation directory is in user name \node_modules. Here less installed, then configure Webstorm. Open Webstorm's file->settings->external Tools, click the "Plus" sign add in the upper left corner to enter the dialog box
Program is set in the path of LESSC, where the directory can refer to the screenshot in the red box in the directory, he will be compiled to the root directory default. For example:/USERS/XX/NODE_MODULES/LESS/BIN/LESSC If you want to conveniently compress the compiled CSS, in addition to writing in arguments--plugin= LESS-PLUGIN-CLEAN-CSS also install the compression plugin: sudo npm install-g less-plugin-clean-css, here to pay attention to my installation path, If the last Less-plugin-clean-css path and the top of the/users/xx/node_modules/less not a path then also run up, so how to solve it, You can directly copy the Less-plugin-clean-css folder in the Clean-css path to/users/xx/node_modules/.
Then you can specify a shortcut key for this compiler, I use ALT + B to open a. Less suffix name file, shortcut key compilation, if Webstorm bottom state controller shows Process finished with exit code 0, then congratulations, Done.