Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Alloy/commands/compile/styler.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ exports.loadStyle = function(tssFile) {
// [ALOY-793] double-escape '\' in tss
contents = contents.replace(/(\s)(\\+)(\s)/g, '$1$2$2$3');

// able to use "@include './file'" in a TSS file
var regex = /@include[ \t]*[ \t]*['"](.*?)['"][ \t]*[ \t]*?;/;
while (match = regex.exec(contents)) {
var dir = path.dirname(tssFile);
contents = contents.replace(match[0], fs.readFileSync(path.join(dir, match[1] + '.tss')));
}

// Process tss file then convert to JSON
var json;
try {
Expand Down