Skip to content

Commit 34d5f4d

Browse files
committed
chore(dist): updating distributables to version 0.10.0
1 parent 89cd5ce commit 34d5f4d

File tree

6 files changed

+121
-57
lines changed

6 files changed

+121
-57
lines changed

dist/file-size.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"compressed": "2 KB"
55
},
66
"dist/sass.sync.js": {
7-
"normal": "2775 KB",
8-
"compressed": "586 KB"
7+
"normal": "2707 KB",
8+
"compressed": "572 KB"
99
},
1010
"dist/sass.worker.js": {
11-
"normal": "2775 KB",
12-
"compressed": "586 KB"
11+
"normal": "2707 KB",
12+
"compressed": "571 KB"
1313
}
1414
}

dist/sass.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! sass.js - v0.9.13 (236485c) - built 2016-09-25
2-
providing libsass 3.3.6 (3ae9a20)
3-
via emscripten 1.36.5 (8e29cf1)
1+
/*! sass.js - v0.10.0 (89cd5ce) - built 2016-12-11
2+
providing libsass 3.4.0 (5b92405)
3+
via emscripten 1.36.0 ()
44
*/
55

66
(function (root, factory) {

dist/sass.node.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*! sass.js - v0.10.0 (89cd5ce) - built 2016-12-11
2+
providing libsass 3.4.0 (5b92405)
3+
via emscripten 1.36.0 ()
4+
*/
5+
var fs = require('fs');
6+
var Sass = require('./sass.sync.js');
7+
8+
function fileExists(path) {
9+
var stat = fs.statSync(path);
10+
return stat && stat.isFile();
11+
}
12+
13+
function importFileToSass(path, done) {
14+
// any path must be relative to CWD to work in both environments (real FS, and emscripten FS)
15+
var requestedPath = './' + path;
16+
// figure out the *actual* path of the file
17+
var filesystemPath = Sass.findPathVariation(fileExists, requestedPath);
18+
if (!filesystemPath) {
19+
done({
20+
error: 'File "' + requestedPath + '" not found',
21+
});
22+
23+
return;
24+
}
25+
26+
// write the file to emscripten FS so libsass internal FS handling
27+
// can engage the scss/sass switch, which apparently does not happen
28+
// for content provided through the importer callback directly
29+
var content = fs.readFileSync(filesystemPath, {encoding: 'utf8'});
30+
Sass.writeFile(filesystemPath, content, function() {
31+
done({
32+
path: filesystemPath,
33+
});
34+
});
35+
}
36+
37+
function importerCallback(request, done) {
38+
// sass.js works in the "/sass/" directory, make that relative to CWD
39+
var requestedPath = request.resolved.replace(/^\/sass\//, '' );
40+
importFileToSass(requestedPath, done);
41+
}
42+
43+
function compileFile(path, options, callback) {
44+
if (!callback) {
45+
callback = options;
46+
options = {};
47+
}
48+
49+
Sass.importer(importerCallback);
50+
importFileToSass(path, function() {
51+
Sass.compileFile(path, options, callback);
52+
});
53+
}
54+
55+
compileFile.importFileToSass = importFileToSass;
56+
compileFile.Sass = Sass;
57+
58+
module.exports = compileFile;

dist/sass.sync.js

Lines changed: 25 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sass.worker.js

Lines changed: 25 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/versions.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"emscripten": {
3-
"version": "1.36.5",
4-
"commit": "8e29cf1"
3+
"version": "1.36.0",
4+
"commit": null
55
},
66
"libsass": {
7-
"version": "3.3.6",
8-
"commit": "3ae9a20"
7+
"version": "3.4.0",
8+
"commit": "5b92405"
99
},
1010
"sassjs": {
11-
"version": "0.9.13",
12-
"commit": "236485c",
11+
"version": "0.10.0",
12+
"commit": "89cd5ce",
1313
"branch": "master"
1414
}
1515
}

0 commit comments

Comments
 (0)