Home > Web Front-end > Front-end Q&A > What does node sass do?

What does node sass do?

coldplay.xixi
Release: 2023-01-03 09:31:18
Original
9155 people have browsed it

node sass is a library that binds Node.js to LibSass [the C version of the popular stylesheet preprocessor Sass], which allows users to convert [.scss] files incredibly quickly Compile locally to css and automatically compile by connecting middleware.

What does node sass do?

The operating environment of this article: Windows 7 system, node v4.4.3 version, Dell G3 computer.

What is Sass?

Sass is a preprocessor scripting language that can be interpreted or compiled into Cascading Style Sheets (CSS).

Sass consists of two syntaxes: the older syntax uses indentation to separate blocks of code and newlines into separate rules; the newer syntax SCSS uses a block format like CSS. It uses curly braces to represent blocks of code and semicolons to separate lines within a block.

Indented syntax and SCSS files are traditionally given extensions .sass and .scss respectively

How to install Node-sass ?

In view of the domestic environment, node-sass is too difficult to install. It can be installed directly through Taobao’s npm image.

1. Install cnpm (https://npm.taobao.org/)

npm install -g cnpm --registry=https://registry.npm.taobao.org
Copy after login

2. Install node-sass in the project folder

cnpm install --save-dev node-sass
Copy after login

Instructions: - -save-dev automatically adds node-sass to package.json in the project folder.

If you want to know more about free learning, please pay attention to the php training column!

The above is the detailed content of What does node sass do?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template