Skip to content

Commit f505b75

Browse files
committed
fix: deleting the data instead of setting it null. (angular#413)
Also, remove ngConfig which was added by mistake, and new tests for sass.
1 parent 2fac21b commit f505b75

File tree

2 files changed

+6
-71
lines changed

2 files changed

+6
-71
lines changed

docs/design/ngConfig.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

lib/broccoli/angular-broccoli-sass.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
const requireOrNull = require('./require-or-null');
55
const Plugin = require('broccoli-caching-writer');
66
const fse = require('fs-extra');
7+
const path = require('path');
78
const Funnel = require('broccoli-funnel');
89

910
let sass = requireOrNull('node-sass');
@@ -24,7 +25,10 @@ class SASSPlugin extends Plugin {
2425

2526
build() {
2627
this.listFiles().forEach(fileName => {
27-
this.compile(fileName, this.inputPaths[0], this.outputPath);
28+
// Normalize is necessary for changing `\`s into `/`s on windows.
29+
this.compile(path.normalize(fileName),
30+
path.normalize(this.inputPaths[0]),
31+
path.normalize(this.outputPath));
2832
});
2933
}
3034

@@ -35,11 +39,11 @@ class SASSPlugin extends Plugin {
3539
// We overwrite file, outFile and include the file path for the includePath.
3640
// We also make sure the options don't include a data field.
3741
const sassOptions = Object.assign(this.options, {
38-
data: null,
3942
file: fileName,
4043
outFile: outFileName,
4144
includePaths: [inputPath].concat(this.options.includePaths || [])
4245
});
46+
delete sassOptions.data;
4347

4448
const result = sass.renderSync(sassOptions);
4549
fse.outputFileSync(outFileName, result.css, 'utf-8');

0 commit comments

Comments
 (0)