Windows under Sbulime text installation less2css tread on several pits

Source: Internet
Author: User
Tags install node

Sublime not introduced, LESS2CSS is a plug-in installed on the sublime, you can write less after the automatic generation of CSS files, but also can be prompted less syntax error.

Search the relevant tutorials, many of them are not all written, follow their steps down after the discovery of errors, and even do not run correctly.

Straight into the topic, step (here only to write the installation steps under Windows, the use of brew under the Mac to install is very simple, and generally will not be wrong, skip directly)

1. Automatic compilation is dependent on node, so first install node, go to node website to download the version you need and then install it, usually the installer will automatically help you configure the environment variables, add the node installation directory to the system variables, if not check and manually add the environment variable (do not know how to set? Do it yourself);

2. After the installation of node also need to install node under less, need to install the global (after the installation of node, automatically with NPM, so the DOS command line directly run the following command, the-G parameter for the global installation, will help you install to the%appdata% directory).

NPM Install-g Less

Will not be automatically compiled if not installed

3. The LESS2CSS runtime also performs a clean-css function, so you also need to install LESS-PLUGIN-CLEAN-CSS under node, which also requires a global installation

NPM install-g Less-plugin-clean-css

If you do not install it, the error will pop up each time you save, and of course you can also screen the error by modifying the LESS2CSS configuration file.

4. Finally, we open the sublime, install the LESS2CSS plug-in (ctrl+shift+p)-----LESS2CSS Enter with the installation package command, Wait for the installation to complete reboot sublime.

5. In order to support less syntax highlighting, you also need to install a sublime plugin less so that you can write less smoothly.

Windows under Sbulime text installation less2css tread on several pits

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.