sheetloaf 1.3.1-beta.0 → 1.3.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -6
- package/dist/sources.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ const configs = __importStar(require("./configs"));
|
|
|
47
47
|
const fileFinder = __importStar(require("./fileFinder"));
|
|
48
48
|
const sources = __importStar(require("./sources"));
|
|
49
49
|
const sheetloaf = new commander_1.Command();
|
|
50
|
-
sheetloaf.version("1.3.1-beta.
|
|
50
|
+
sheetloaf.version("1.3.1-beta.1", '-v, --version', 'Print the version of Sheetloaf.');
|
|
51
51
|
let usingStdin = false;
|
|
52
52
|
let postcssConfig = {
|
|
53
53
|
plugins: []
|
|
@@ -115,14 +115,13 @@ function renderPartially(source, fileName) {
|
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
117
117
|
let partialExistsInSassSources = false;
|
|
118
|
-
|
|
119
|
-
if (
|
|
118
|
+
sources.getChecker().forEach((source) => {
|
|
119
|
+
if (source.containsPartial(fileName)) {
|
|
120
120
|
partialExistsInSassSources = true;
|
|
121
|
-
renderSass(
|
|
121
|
+
renderSass(source.getMain());
|
|
122
122
|
}
|
|
123
|
-
}
|
|
123
|
+
});
|
|
124
124
|
if (partialExistsInSassSources === false) {
|
|
125
|
-
console.log(fileName);
|
|
126
125
|
sources.clearSourcesChecker();
|
|
127
126
|
renderAllFiles(source);
|
|
128
127
|
}
|
package/dist/sources.js
CHANGED
|
@@ -50,13 +50,14 @@ function clearSourcesChecker() {
|
|
|
50
50
|
exports.clearSourcesChecker = clearSourcesChecker;
|
|
51
51
|
function addResultToSourcesChecker(fileName, result) {
|
|
52
52
|
let resultExistsInChecker = false;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
let ind = 0;
|
|
54
|
+
while (ind < sourcesChecker.length && resultExistsInChecker === false) {
|
|
55
|
+
if (sourcesChecker[ind].getAbsoluteMain() === path_1.default.resolve(fileName)) {
|
|
56
|
+
sourcesChecker[ind].setSources(result.loadedUrls);
|
|
56
57
|
resultExistsInChecker = true;
|
|
57
|
-
return false;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
ind = ind + 1;
|
|
60
|
+
}
|
|
60
61
|
if (resultExistsInChecker === false) {
|
|
61
62
|
sourcesChecker.push(new SassSources(fileName, result));
|
|
62
63
|
}
|