New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fis-parser-sass

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis-parser-sass - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js

@@ -250,3 +250,3 @@ /*

mapping.setContent(ret.map);
mapping.setContent(ret.map.toString());

@@ -258,3 +258,3 @@ file.extras = file.extras || {};

return ret.css;
return ret.css.toString();
};

@@ -261,0 +261,0 @@

{
"name": "fis-parser-sass",
"description": "A parser plugin for fis to compile sass file.",
"version": "1.0.0",
"version": "1.0.1",
"author": "FIS Team <fis@baidu.com>",

@@ -6,0 +6,0 @@ "homepage": "http://fis.baidu.com/",

@@ -1,8 +0,9 @@

fis-parser-sass
============================
# fis-parser-sass
已停止更新,请移步至:https://github.com/fex-team/fis-parser-node-sass
新版本已改成 dart-sass 了,纯 js 版本,相比 fis-parser-node-sass (libsass) 版本要慢一点。但是这个版本跟 Ruby 版本功能上是比较接近的。
## 安装与使用
https://github.com/sass/dart-sass/blob/master/differences.md
## 安装与使用
全局安装

@@ -17,10 +18,10 @@

```javascript
fis.config.merge('modules.parser', {
sass : 'sass',
scss: 'sass'
fis.config.merge("modules.parser", {
sass: "sass",
scss: "sass",
});
fis.config.merge('roadmap.ext', {
sass: 'css',
scss: 'css'
fis.config.merge("roadmap.ext", {
sass: "css",
scss: "css",
});

@@ -32,68 +33,6 @@ ```

```javascript
fis.config.set('settings.parser.sass', {
// 加入文件查找目录
include_paths: []
fis.config.set("settings.parser.sass", {
// 加入文件查找目录
include_paths: [],
});
```
## 在项目中使用sass和compass
有了 ``fis-parser-sass`` 就可用用compass了,方法如下:
1. 安装 ``fis-parser-sass`` 插件:
```shell
npm install -g fis-parser-sass
```
1. 下载 [compass](https://github.com/Igosuki/compass-mixins) 框架,把框架中的 ``frameworks/compass/stylesheets`` 目录下的文件放到你的项目中,得到目录结构:
```
project
┣ compass
┣ _compass.scss
┣ _lemonade.scss
┗ fis-conf.js
```
1. 配置fis
```javascript
//项目排除掉_xxx.scss,这些属于框架文件,不用关心
fis.config.set('project.exclude', '**/_*.scss');
//scss后缀的文件,用fis-parser-sass插件编译
fis.config.set('modules.parser.scss', 'sass');
//scss文件产出为css文件
fis.config.set('roadmap.ext.scss', 'css');
```
1. 新建一个 scss 文件测试一下:
```scss
@import "compass/layout/grid-background";
a {
background: get-baseline-gradient(rgba(255, 0, 0, 0));
font-weight: bold;
text-decoration: none;
&:hover { text-decoration: underline; }
body.firefox & { font-weight: normal; }
}
```
1. fis release -d output
1. 文件编译结果
```css
a {
background: linear-gradient(bottom, #f00 5%, rgba(255, 0, 0, 0) 5%);
font-weight: bold;
text-decoration: none; }
a:hover {
text-decoration: underline; }
body.firefox a {
font-weight: normal; }
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc