Webstorm configuring SCSS Automatic compilation Path

Source: Internet
Author: User

Webstorm supports synchronous compilation of sass, which is write-and-compile, and can specify the directory of the compiled CSS.

The webstorm used in this article is version 8.0

In the top left corner, click FileSettingsFile Watchers

Click the green ' + ' sign in the upper-right corner of the window of the popup, then select Scss

-------------------------------------------------------------------------------

Arguments:

You can configure the output path of the compiled file, which I write here:

--no-cache --update --sourcemap --watch $FileName$:$FileParentDir$\css\$FileNameWithoutExtension$.css

Notice that $FileName$ there is a colon followed by the $FileParentDir$ parent folder of the folder where the Scss file is located , not the parent folder of the Scss file.

For a chestnut, my project called sass-learn , there is a Scss folder, which contains scss files, then according to the results of such a configuration, Style.scss folder is Scss,scss is the parent folder is Sass-learn, Then find the CSS folder under Sass-learn, and the compiled Style.css file will be here.

---------------------------------------------------------------------------------

Output Paths to refresh:

Change to this:$FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map

There are two points to note in the process of use:

1. Synchronous compilation can only be opened under the project folder, that is, webstorm to the left of the project. It is not possible to open a file outside of a project.
2. This has nothing to do with Webstorm, that is, sass compilation can not be with Chinese, no matter the path name, filename, the contents of the file, can not be recognized in Chinese, if you want to modify it is not not, but I do not think Chinese is very good, develop good habits.

Webstorm configuring SCSS Automatic compilation Path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.