forked from medialize/sass.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sass.source.html
47 lines (44 loc) · 1.72 KB
/
sass.source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Sass.js Source Console</title>
</head>
<body>
<h1>Sass.js Source Console</h1>
<p>This document loads the <em>source</em> Sass.js. You have to compile libsass using <code>grunt libsass:prepare libsass:build</code> before this will work. Please open your browser's DevTools to use the API.</p>
<h2>Try the following example:</h2>
<pre>Sass.writeFile('testfile.scss', '@import "sub/deeptest";\n.testfile { content: "loaded"; }', function() {
console.log('wrote "testfile.scss"');
});
Sass.writeFile('sub/deeptest.scss', '.deeptest { content: "loaded"; }', function() {
console.log('wrote "sub/deeptest.scss"');
});
Sass.options({ style: Sass.style.expanded }, function(result) {
console.log("set options");
});
Sass.compile('@import "testfile";', function(result) {
console.log("compiled", result.text);
});</pre>
<script src="libsass/libsass/lib/libsass.js"></script>
<script src="src/sass.util.js"></script>
<script src="src/sass.options.js"></script>
<script src="src/sass.importer.js"></script>
<script src="src/sass.api.js"></script>
<script src="src/sass.resolve-paths.js"></script>
<script>
Sass.writeFile('testfile.scss', '@import "sub/deeptest";\n.testfile { content: "loaded"; }', function() {
console.log('wrote "testfile.scss"');
});
Sass.writeFile('sub/deeptest.scss', '.deeptest { content: "loaded"; }', function() {
console.log('wrote "sub/deeptest.scss"');
});
Sass.options({ style: Sass.style.expanded }, function(result) {
console.log("set options");
});
Sass.compile('@import "testfile";', function(result) {
console.log("compiled", result.text);
});
</script>
</body>
</html>