Home >Web Front-end >Front-end Q&A >What does node sass do?
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.
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
2. Install node-sass in the project folder
cnpm install --save-dev node-sass
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!