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

Commit

Permalink
Package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalarangelo committed Aug 4, 2018
1 parent febc5ee commit 190a590
Show file tree
Hide file tree
Showing 10 changed files with 1,223 additions and 187 deletions.
1 change: 1 addition & 0 deletions docs/doc-fragments/buildYourOwnFlavor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,7 @@ module.exports = {
document.getElementById('generatorStatus').innerHTML = 'Configuring the generator...';
var sass = new Sass();
sass.options({style: Sass.style.expanded, precision: -1, comments: false, indent: ' ', linefeed: '\\n'});
console.log(sass);
document.getElementById('generatorStatus').innerHTML = 'Loading SCSS files...';
sass.preloadFiles(base, directory, files, function filesPreloaded() {
document.getElementById('generatorStatus').innerHTML = 'Generating flavor file...';
Expand Down
8 changes: 4 additions & 4 deletions docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,12 @@ <h2 class="section double-padded">Forms &amp; input</h2>
<div class="section double-padded"><h3>Best practices</h3><div class="row dodos"><div class="col-sm-12 col-md-6"><pre><span class="code-line"><span class="highlight-a">&lt;form&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;fieldset&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;legend&gt;</span>Simple form<span class="highlight-a">&lt;/legend&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div&gt;</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;row&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div&gt;</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;label</span> <span class="highlight-b">for</span>=<span class="highlight-c">&quot;username&quot;</span><span class="highlight-a">&gt;</span>Username<span class="highlight-a">&lt;/label&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;input</span> <span class="highlight-b">type</span>=<span class="highlight-c">&quot;text&quot;</span> <span class="highlight-b">id</span>=<span class="highlight-c">&quot;Username&quot;</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">&quot;Username&quot;</span><span class="highlight-a">/&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;div&gt;</span> <span class="highlight-b">class</span>=<span class="highlight-c">&quot;col-sm-12 col-md-6&quot;</span><span class="highlight-a">&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;label</span> <span class="highlight-b">for</span>=<span class="highlight-c">&quot;password&quot;</span><span class="highlight-a">&gt;</span>Password<span class="highlight-a">&lt;/label&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;input</span> <span class="highlight-b">type</span>=<span class="highlight-c">&quot;password&quot;</span> <span class="highlight-b">id</span>=<span class="highlight-c">&quot;password&quot;</span> <span class="highlight-b">placeholder</span>=<span class="highlight-c">&quot;Password&quot;</span><span class="highlight-a">/&gt;</span></span>
<span class="code-line"> <span class="highlight-a">&lt;/div&gt;</span></span>
Expand Down Expand Up @@ -1066,4 +1066,4 @@ <h2 class="section double-padded">Responsive spacing &amp; sizing</h2>
'</form>' + e.innerHTML);
</script>
<style id="search-style">#no-results{display:none;}</style>
</body></html>
</body></html>
1 change: 1 addition & 0 deletions docs/flavors.html
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,7 @@ <h3>Get your flavor</h3>
document.getElementById('generatorStatus').innerHTML = 'Configuring the generator...';
var sass = new Sass();
sass.options({style: Sass.style.expanded, precision: -1, comments: false, indent: ' ', linefeed: '\n'});
console.log(sass);
document.getElementById('generatorStatus').innerHTML = 'Loading SCSS files...';
sass.preloadFiles(base, directory, files, function filesPreloaded() {
document.getElementById('generatorStatus').innerHTML = 'Generating flavor file...';
Expand Down
2 changes: 1 addition & 1 deletion docs/mini/_progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ progress {
}
// Background color on webkit browser
&::-webkit-progress-bar {
background: var(#{$progress-back-color});
background: var(#{$progress-back-color-var});
}
// Foreground color on Firefox
&::-moz-progress-bar {
Expand Down
6 changes: 3 additions & 3 deletions docs/sass.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! sass.js - v0.10.9 (3e41106) - built 2018-02-06
providing libsass 3.4.9 (6de5050d)
via emscripten 1.37.33 ()
/*! sass.js - v0.10.10 (4ca6ca1) - built 2018-07-07
providing libsass 3.5.4 (1e52b743)
via emscripten 1.37.35 ()
*/

(function (root, factory) {
Expand Down
80 changes: 80 additions & 0 deletions docs/sass.node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*! sass.js - v0.10.10 (4ca6ca1) - built 2018-07-07
providing libsass 3.5.4 (1e52b743)
via emscripten 1.37.35 ()
*/
var Sass = require('./sass.sync.js');
var fs = require('fs');
var path = require('path');

function fileExists(path) {
var stat = fs.statSync(path);
return stat && stat.isFile();
}

function removeFileExtension(path) {
return path.slice(0, path.lastIndexOf('.'));
}

function importFileToSass(path, done) {
// any path must be relative to CWD to work in both environments (real FS, and emscripten FS)
var requestedPath = './' + path;
// figure out the *actual* path of the file
var filesystemPath = Sass.findPathVariation(fileExists, requestedPath);
if (!filesystemPath) {
done({
error: 'File "' + requestedPath + '" not found',
});

return;
}

// Make sure to omit the ".css" file extension when it was omitted in requestedPath.
// This allow raw css imports.
// see https://github.com/sass/libsass/pull/754
var isRawCss = !requestedPath.endsWith('.css') && filesystemPath.endsWith('.css');
var targetPath = isRawCss ? removeFileExtension(filesystemPath) : filesystemPath;

// write the file to emscripten FS so libsass internal FS handling
// can engage the scss/sass switch, which apparently does not happen
// for content provided through the importer callback directly
var content = fs.readFileSync(filesystemPath, {encoding: 'utf8'});
Sass.writeFile(filesystemPath, content, function() {
done({
path: targetPath,
});
});
}

function importerCallback(request, done) {
importFileToSass(resolve(request), done);
}

function compileFile(path, options, callback) {
if (!callback) {
callback = options;
options = {};
}

Sass.importer(importerCallback);
importFileToSass(path, function() {
Sass.compileFile(path, options, callback);
});
}

function resolve(request) {
// the request will not have the correct "resolved" path on Windows
// see https://github.com/medialize/sass.js/issues/69
// see https://github.com/medialize/sass.js/issues/86
return path.normalize(
path.join(
// sass.js works in the "/sass/" directory, make that relative to CWD
path.dirname(request.previous.replace(/^\/sass\//, '')),
request.current
)
).replace(/\\/g, '/');
}

compileFile.importFileToSass = importFileToSass;
compileFile.Sass = Sass;

module.exports = compileFile;
827 changes: 827 additions & 0 deletions docs/sass.sync.js

Large diffs are not rendered by default.

49 changes: 25 additions & 24 deletions docs/sass.worker.js

Large diffs are not rendered by default.

Loading

0 comments on commit 190a590

Please sign in to comment.