Creating a File Watcher
PhpStorm provides a common procedure and user interface for creating File Watchers of all types. The only difference is in the predefined templates you choose in each case.
-
Make sure the File Watchers plugin is enabled. The plugin is bundled with PhpStorm and activated by default. If it is not, enable the plugin. See Enabling and Disabling Plugins for details.
-
To start creating a File Watcher, open the Settings dialog box by choosing on the main menu, and then click File Watchers under the Tools node. The File Watchers pagethat opens, shows the list of File Watchers that are already configured in the project.
-
Click the Add button
or press Alt+Insert. Depending on the tool you are going to use, choose the appropriate predefined template from the pop-up list:
-
Less
-
Sass
-
SCSS
-
lessc.cmdfor Less If you installed the tool through the Node Package Manager, PhpStorm locates the required file itself at<node.js_home>/node_modules/bin/lessc.cmdand fills in the field automatically. Otherwise, type the path manually or click the Browsebuttonand choose the file location in the dialog box that opens.
-
sass.batfor Sass -
scss.batfor SCSS
本文转自 陈小龙哈 51CTO博客,原文链接:
http://blog.51cto.com/chenxiaolong/1702873