Tag: sa libsass

节点sass不导入

我正在用nodejs,electron和node-sass构build一个sass编译器。 将有一个configuration文件,将描述许多项目的一些“sass编译器”,用户将有能力通过GUI来激活和停用它们。 我用“电子”来pipe理界面,并使用电子“ipcmain”来按需启动编译器。 为了初始化编译器,我生成了一个包含整个编译器的subprocess。 编译完成以下代码: var result = this.sass.renderSync({ file: 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\scss\\style.scss', outFile: 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\css\\style.css', includePaths:[ 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\scss\\', 'C:\\Users\\George\\Desktop\\css_compiler_tests\\test3\\scss\\foundation\\components\\' ] }); 我使用绝对path执行编译,但文件是相对path。 我运行我的程序/ gui,并激活编译器,我有一个CSS文件。 问题是一些import缺less。 我的根文件夹位于'C:\ Users \ George \ Desktop \ css_compiler_tests \ test3 \'。 我尝试编译导入'scss_inculded-files.scss'的'scss \ style.scss'。 文件'scss_inculded-files'导入'scss \ foundation.scss',它导入'scss \ foundation \ components'格式。 这里是一个例子: /*scss\style.scss*/ @import "included-files"; /*scss\_inculded-files.scss*/ @import "includes/fonts", "includes/custom-colors", "includes/foundation-custom-settings", "foundation/settings", "foundation"; /*scss\foundation.scss*/ […]