Detailed below
First we go to download a https://nodejs.org/en/, all the way next, because the file is not big, directly on the C drive
Of course I personally do not recommend in the C-drive, you like on which disk on which disk
Go to cmd
Okay, we've already seen the version number of node and NPM.
This means we have successfully installed
If you don't see it, you need to execute CMD under Administrator privileges
Then you need to create a two folder
Enter in cmd
NPM config set prefix "C:\program Files\nodejs\node_global"
NPM config Set cache "C:\program Files\nodejs\node_cache"
That should be correct.
OK below, go to less Chinese web, we see how to install
In the installation of this item, we can see that the $ symbol does not have to be lost.
Enter NPM in cmd install-g Less, after a long wait, well, @[email protected]
, you have installed the
below to find out which folder our LESSC files are in
Look at the Node_global folder under the Nodejs of the C drive.
Then we're going to go inside this folder from CMD.
Okay, now it's in this folder.
Here is a conversion statement LESSC styles.less styles.css
The path of the path CSS file for the LESSC less file
Because my less file is inside my project, which is the path G:\html\project_html5\css
According to the format of the translated statement, enter the following
Look at the results
Well, it's been translated, and then you can use it directly.
If there is a problem, that is cmd you want to open with administrator privileges
In addition, there is a problem, when you go from other places without entering that folder when the LESSC compiled cmd will prompt the error,
Then you need to configure the environment variables:
Right-click on my Computer Properties advanced system settings environment variables (Advanced):
Add the path to your less file in path.
Nodejs Install less (NPM mode)