Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
True removed support for node-sass in v6.
Browse files Browse the repository at this point in the history
Relates to:
#856
  • Loading branch information
notlee committed Aug 5, 2020
1 parent b7a9893 commit a5132e1
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tasks/test-sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ const trueTest = function(config, task) {
const componentBase = path.join(__dirname, '../../');
const sassFile = path.join(__dirname, 'index.test.scss');
const sassTrue = require('${require.resolve("sass-true")}');
const sass = require('${require.resolve("sass")}');
const getSassIncludePaths = ${files.getSassIncludePaths.toString()};
const sass = '$system-code: "origami-build-tools";' + fs.readFileSync(sassFile);
const sassData = '$system-code: "origami-build-tools";' + fs.readFileSync(sassFile);
sassTrue.runSass({
data: sass,
data: sassData,
// We use this to silence the sass console output when running "obt test".
functions: {},
includePaths: [__dirname].concat(getSassIncludePaths(componentBase, ${JSON.stringify(
config
)}))
}, {
describe, it
describe, it, sass
});
`
)
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"node-version": "^2.0.0",
"npm-prepublish": "^1.2.3",
"rimraf": "^3.0.2",
"sass": "^1.26.10",
"unique-temp-dir": "^1.0.0"
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@include test-module('oTestComponentHelloWorld') {
@include test('Can be included') {
@include assert {
@include output($selector: false) {
@include oTestComponentHelloWorld();
}
@include expect($selector: false) {
body:after {
content: 'Hello world!';
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'true';

@import '../../main';

@import 'mixins.test';
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@include test-module('oTestComponentHelloWorld') {
@include test('Can be included') {
@include assert {
@include output($selector: false) {
@include oTestComponentHelloWorld();
}
@include expect($selector: false) {
body:after {
content: 'Hello world!';
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import 'true';

@import '../../main';

@import 'mixins.test';

0 comments on commit a5132e1

Please sign in to comment.