Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scss-bundle

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scss-bundle - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

@types/arguments.d.ts
import * as Contracts from "./contracts";
export declare let argv: Contracts.ArgumentsValues;
export declare const argv: Contracts.ArgumentsValues;

@@ -25,4 +25,5 @@ export interface FileRegistry {

private bundle(filePath, content, dedupeFiles, includePaths);
private removeImportsFromComments(text);
private resolveImport(importData, includePaths);
private globFilesOrEmpty(globsList);
}

@@ -0,1 +1,2 @@

import * as yargs from "yargs";
export interface Config {

@@ -13,3 +14,3 @@ Entry: string;

}
export interface ArgumentsValues {
export interface ArgumentsValues extends yargs.Arguments {
config?: string;

@@ -16,0 +17,0 @@ entry: string;

@@ -5,4 +5,4 @@ "use strict";

const Contracts = require("./contracts");
let verbosityValues = [];
for (let key in Contracts.Verbosity) {
const verbosityValues = [];
for (const key in Contracts.Verbosity) {
if (Number(key) % 1 !== 0) {

@@ -16,5 +16,3 @@ verbosityValues.push(key);

.alias("h", "help")
.version(() => {
return `Current version: ${require("../package.json").version}.`;
})
.version()
.alias("v", "version")

@@ -47,2 +45,2 @@ .config("config")

.argv;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJndW1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FyZ3VtZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLCtCQUErQjtBQUUvQix5Q0FBeUM7QUFFekMsSUFBSSxlQUFlLEdBQWEsRUFBRSxDQUFDO0FBQ25DLEdBQUcsQ0FBQyxDQUFDLElBQUksR0FBRyxJQUFJLFNBQVMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO0lBQ2xDLEVB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QgREVEVVBFX0tFWSA9IFwiZGVkdXBlXCI7XHJcblxyXG5leHBvcnQgY29uc3QgYXJndiA9IHlhcmdzXHJcbiAgICAuaGVscChcImhcIiwgXCJTaG93IGhlbHAuXCIpXHJcbiAgICAuYWxpYXMoXCJoXCIsIFwiaGVscFwiKVxyXG4gICAgLnZlcnNpb24oKVxyXG4gICAgLmFsaWFzKFwidlwiLCBcInZlcnNpb25cIilcclxuICAgIC5jb25maWcoXCJjb25maWdcIilcclxuICAgIC5hbGlhcyhcImNcIiwgXCJjb25maWdcIilcclxuICAgIC5vcHRpb25zKFwiZVwiLCB7XHJcbiAgICAgICAgYWxpYXM6IFwiZW50cnlcIixcclxuICAgICAgICBkZXNjcmliZTogXCJFbnRyeSBmaWxlLlwiLFxyXG4gICAgICAgIHR5cGU6IFwic3RyaW5nXCJcclxuICAgIH0pXHJcbiAgICAub3B0aW9ucyhcImRcIiwge1xyXG4gICAgICAgIGFsaWFzOiBcImRlc3RcIixcclxuICAgICAgICBkZXNjcmliZTogXCJCdW5kbGVkIGZpbGUgZGVzdGluYXRpb24uXCIsXHJcbiAgICAgICAgdHlwZTogXCJzdHJpbmdcIlxyXG4gICAgfSlcclxuICAgIC5vcHRpb25zKFwidmVyYm9zaXR5XCIsIHtcclxuICAgICAgICBkZXNjcmliZTogXCJWZXJib3NpdHkgb2Ygb3V0cHV0LlwiLFxyXG4gICAgICAgIGNob2ljZXM6IHZlcmJvc2l0eVZhbHVlcyxcclxuICAgICAgICBkZWZhdWx0OiBDb250cmFjdHMuVmVyYm9zaXR5W0NvbnRyYWN0cy5WZXJib3NpdHkuVmVyYm9zZV1cclxuICAgIH0pXHJcbiAgICAub3B0aW9ucyhcImluY2x1ZGVQYXRoc1wiLCB7XHJcbiAgICAgICAgZGVzY3JpYmU6IFwiSW5jbHVkZSBwYXRocyBmb3IgcmVzb2x2aW5nIGltcG9ydHMuXCIsXHJcbiAgICAgICAgdHlwZTogXCJhcnJheVwiXHJcbiAgICB9KVxyXG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GFueSk6IG51bWJlciB7XHJcbiAgICAgICAgLy8gQ29udmVydCBnaXZlbiB2YWx1ZSB0byBhbiBhcHByb3ByaWF0ZSBWZXJib3NpdHkgZW51bSB2YWx1ZS5cclxuICAgICAgICAvLyAnYXMgYW55IGFzIG51bWJlcicgaXMgdXNlZCBiZWNhdXNlIFR5cGVTY3JpcHQgdGhpbmtzXHJcbiAgICAgICAgLy8gIHRoYXQgd2UgY2FzdCBzdHJpbmcgdG8gbnVtYmVyLCBldmVuIHRob3VnaCB3ZSBnZXQgYSBudW1iZXIgdGhlcmVcclxuICAgICAgICByZXR1cm4gQ29udHJhY3RzLlZlcmJvc2l0eVt2ZXJib3NpdHldIGFzIGFueSBhcyBudW1iZXI7XHJcbiAgICB9XHJcbn1cclxuXHJcbm5ldyBCdW5kbGVDbGkoYXJndik7XHJcbiJdfQ==

@@ -11,3 +11,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("mz/fs");
const fs = require("fs-extra");
const os = require("os");

@@ -18,3 +18,4 @@ const path = require("path");

const IMPORT_PATTERN = /@import ['"](.+)['"];/g;
const COMMENTED_IMPORT_PATTERN = /\/\/@import '(.+)';/g;
const COMMENT_PATTERN = /\/\/.+?[\r\n|\n]/g;
const MULTILINE_COMMENT_PATTERN = /\/\*[\s\S]*?\*\//g;
const FILE_EXTENSION = ".scss";

@@ -31,3 +32,3 @@ class Bundler {

return __awaiter(this, void 0, void 0, function* () {
const resultsPromises = files.map(file => this.Bundle(file, dedupeGlobs));
const resultsPromises = files.map((file) => __awaiter(this, void 0, void 0, function* () { return this.Bundle(file, dedupeGlobs); }));
return yield Promise.all(resultsPromises);

@@ -57,3 +58,3 @@ });

// Remove commented imports
content = content.replace(COMMENTED_IMPORT_PATTERN, "");
content = this.removeImportsFromComments(content);
// Resolve path to work only with full paths

@@ -105,5 +106,5 @@ filePath = path.resolve(filePath);

// Read
let impContent = yield fs.readFile(imp.fullPath, "utf-8");
const impContent = yield fs.readFile(imp.fullPath, "utf-8");
// and bundle it
let bundledImport = yield this.bundle(imp.fullPath, impContent, dedupeFiles, includePaths);
const bundledImport = yield this.bundle(imp.fullPath, impContent, dedupeFiles, includePaths);
// Then add its bundled content to the registry

@@ -170,2 +171,12 @@ this.fileRegistry[imp.fullPath] = bundledImport.bundledContent;

}
removeImportsFromComments(text) {
const patterns = [
COMMENT_PATTERN,
MULTILINE_COMMENT_PATTERN
];
for (const pattern of patterns) {
text = text.replace(pattern, x => x.replace(IMPORT_PATTERN, "").trim());
}
return text;
}
resolveImport(importData, includePaths) {

@@ -222,2 +233,2 @@ return __awaiter(this, void 0, void 0, function* () {

exports.Bundler = Bundler;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9idW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSw0QkFBNEI7QUFDNUIseUJBQXlCO0FBQ3pCLDZCQUE2QjtBQUM3QiwrQkFBK0I7QUFFL0IscUNBQXFDO0FBRXJDLE1BQU0sY0FBYyxHQUFHLHdCQUF3QixDQUFDO0FBQ2hELE1BQU0sd0JBQXdCLEdBQUcsc0JBQXNCLENBQUM7QUFDeEQsTUFBTSxjQUFjLEdBQUcsT0FBTyxDQUFDO0FBdUIvQjtJQU1JLFlBQW9CLGVBQTZCLEVBQUU7UUFBL0IsaUJBQVksR0FBWixZQUFZLENBQW1CO1FBTG5ELDZDQUE2QztRQUNyQyxnQkFBVyxHQUE4QixFQUFFLENBQUM7UUFDcEQsNkJBQTZCO1FBQ3JCLGtCQUFhLEdBQXNDLEVBQUUsQ0FBQztJQUVQLENBQUM7SUFFM0MsU0FBUyxDQUNsQixLQUFlLEVBQ2YsV0FBcUI7O1lBRXJCLE1BQU0sZUFBZSxHQUFHLEtBQUssQ0FBQyxHQUFHLENBQUMsSUF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1bGxQYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmZpbGVSZWdpc3RyeVtpbXAuZnVsbFBhdGhdID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIC8vIElmIGZpbGUgaXMgbm90IHlldCBpbiB0aGUgcmVnaXN0cnlcclxuICAgICAgICAgICAgICAgIC8vIFJlYWRcclxuICAgICAgICAgICAgICAgIGxldCBpbXBDb250ZW50ID0gYXdhaXQgZnMucmVhZEZpbGUoaW1wLmZ1bGxQYXRoLCBcInV0Zi04XCIpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGFuZCBidW5kbGUgaXRcclxuICAgICAgICAgICAgICAgIGxldCBidW5kbGVkSW1wb3J0ID0gYXdhaXQgdGhpcy5idW5kbGUoaW1wLmZ1bGxQYXRoLCBpbXBDb250ZW50LCBkZWR1cGVGaWxlcywgaW5jbHVkZVBhdGhzKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBUaGVuIGFkZCBpdHMgYnVuZGxlZCBjb250ZW50IHRvIHRoZSByZWdpc3RyeVxyXG4gICAgICAgICAgICAgICAgdGhpcy5maWxlUmVnaXN0cnlbaW1wLmZ1bGxQYXRoXSA9IGJ1bmRsZWRJbXBvcnQuYnVuZGxlZENvbnRlbnQ7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQWRkIGl0IHRvIHVzZWQgaW1wb3J0cywgaWYgaXQncyBub3QgdGhlcmVcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnVzZWRJbXBvcnRzICE9IG51bGwgJiYgdGhpcy51c2VkSW1wb3J0c1tpbXAuZnVsbFBhdGhdID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnVzZWRJbXBvcnRzW2ltcC5mdWxsUGF0aF0gPSAxO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIEFuZCB3aG9sZSBCdW5kbGVSZXN1bHQgdG8gY3VycmVudCBpbXBvcnRzXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50SW1wb3J0ID0gYnVuZGxlZEltcG9ydDtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIC8vIEZpbGUgaXMgaW4gdGhlIHJlZ2lzdHJ5XHJcbiAgICAgICAgICAgICAgICAvLyBJbmNyZW1lbnQgaXQncyB1c2FnZSBjb3VudFxyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudXNlZEltcG9ydHMgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXNlZEltcG9ydHNbaW1wLmZ1bGxQYXRoXSsrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgY2hpbGQgaW1wb3J0cywgaWYgdGhlcmUgYXJlIGFueVxyXG4gICAgICAgICAgICAgICAgbGV0IGNoaWxkSW1wb3J0czogQnVuZGxlUmVzdWx0W10gPSBbXTtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmltcG9ydHNCeUZpbGUgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNoaWxkSW1wb3J0cyA9IHRoaXMuaW1wb3J0c0J5RmlsZVtpbXAuZnVsbFBhdGhdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIENvbnN0cnVjdCBhbmQgYWRkIHJlc3VsdCB0byBjdXJyZW50IGltcG9ydHNcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZVBhdGg6IGltcC5mdWxsUGF0aCxcclxuICAgICAgICAgICAgICAgICAgICBmb3VuZDogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBjaGlsZEltcG9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ICAgICAgICB0aW1lc1VzZWQgIT0gbnVsbCAmJlxyXG4gICAgICAgICAgICAgICAgICAgIHRpbWVzVXNlZCA+IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBSZXNldCBjb250ZW50IHRvIHJlcGxhY2UgdG8gYW4gZW1wdHkgc3RyaW5nIHRvIHNraXAgaXRcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgICAgICAvLyBBbmQgaW5kaWNhdGUgdGhhdCBpbXBvcnQgd2FzIGRlZHVwZWRcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50SW1wb3J0LmRlZHVwZWQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBGaW5hbGx5LCByZXBsYWNlIGltcG9ydCBzdHJpbmcgd2l0aCBidW5kbGVkIGNvbnRlbnQgb3IgYSBkZWJ1ZyBtZXNzYWdlXHJcbiAgICAgICAgICAgIGNvbnRlbnQgPSBjb250ZW50LnJlcGxhY2UoaW1wLmltcG9ydFN0cmluZywgY29udGVudFRvUmVwbGFjZSk7XHJcblxyXG4gICAgICAgICAgICAvLyBBbmQgcHVzaCBjdXJyZW50IGltcG9ydCBpbnRvIHRoZSBsaXN0XHJcbiAgICAgICAgICAgIGN1cnJlbnRJbXBvcnRzLnB1c2goY3VycmVudEltcG9ydCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBTZXQgcmVzdWx0IHByb3BlcnRpZXNcclxuICAgICAgICBidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQgPSBjb250ZW50O1xyXG4gICAgICAgIGJ1bmRsZVJlc3VsdC5pbXBvcnRzID0gY3VycmVudEltcG9ydHM7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmltcG9ydHNCeUZpbGUgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICB0aGlzLmlt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GhzXHJcbiAgICAgICAgICAgICAgICBpZiAoaW5jbHVkZVBhdGhzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgZnVsbFBhdGggdXNpbmcgaXRzIGZpcnN0IGVudHJ5XHJcbiAgICAgICAgICAgICAgICAgICAgaW1wb3J0RGF0YS5mdWxsUGF0aCA9IHBhdGgucmVzb2x2ZShpbmNsdWRlUGF0aHNbMF0sIGltcG9ydERhdGEucGF0aCk7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVHJ5IHJlc29sdmluZyBpbXBvcnQgd2l0aCB0aGUgcmVtYWluaW5nIGluY2x1ZGVQYXRoc1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlbWFpbmluZ0luY2x1ZGVQYXRocyA9IGluY2x1ZGVQYXRocy5zbGljZSgxKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZXNvbHZlSW1wb3J0KGltcG9ydERhdGEsIHJlbWFpbmluZ0luY2x1ZGVQYXRocyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBpbXBvcnREYXRhO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYXN5bmMgZ2xvYkZpbGVzT3JFbXB0eShnbG9ic0xpc3Q6IHN0cmluZ1tdKSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHN0cmluZ1tdPigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChnbG9ic0xpc3QgPT0gbnVsbCB8fCBnbG9ic0xpc3QubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBnbG9icyhnbG9ic0xpc3QsIChlcnI6IEVycm9yLCBmaWxlczogc3RyaW5nW10pID0+IHtcclxuICAgICAgICAgICAgICAgIC8vIFJlamVjdCBpZiB0aGVyZSdzIGFuIGVycm9yXHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBmdWxsIHBhdGhzXHJcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSBmaWxlcy5tYXAoZmlsZSA9PiBwYXRoLnJlc29sdmUoZmlsZSkpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgcHJvbWlzZVxyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxufVxyXG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9idW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwrQkFBK0I7QUFDL0IseUJBQXlCO0FBQ3pCLDZCQUE2QjtBQUM3QiwrQkFBK0I7QUFFL0IscUNBQXFDO0FBRXJDLE1BQU0sY0FBYyxHQUFHLHdCQUF3QixDQUFDO0FBQ2hELE1BQU0sZUFBZSxHQUFHLG1CQUFtQixDQUFDO0FBQzVDLE1BQU0seUJBQXlCLEdBQUcsbUJBQW1CLENBQUM7QUFDdEQsTUFBTSxjQUFjLEdBQUcsT0FBTyxDQUFDO0FBdUIvQjtJQU1JLFlBQW9CLGVBQTZCLEVBQUU7UUFBL0IsaUJBQVksR0FBWixZQUFZLENBQW1CO1FBTG5ELDZDQUE2QztRQUNyQyxnQkFBVyxHQU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50LCBJTVBPUlRfUEFUVEVSTikubWFwKGFzeW5jIG1hdGNoID0+IHtcclxuICAgICAgICAgICAgbGV0IGltcG9ydE5hbWUgPSBtYXRjaFsxXTtcclxuICAgICAgICAgICAgLy8gQXBwZW5kIGV4dGVuc2lvbiBpZiBpdCdzIGFic2VudFxyXG4gICAgICAgICAgICBpZiAoaW1wb3J0TmFtZS5pbmRleE9mKEZJTEVfRVhURU5TSU9OKSA9PT0gLTEpIHtcclxuICAgICAgICAgICAgICAgIGltcG9ydE5hbWUgKz0gRklMRV9FWFRFTlNJT047XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29uc3QgZnVsbFBhdGggPSBwYXRoLnJlc29sdmUoZGlybmFtZSwgaW1wb3J0TmFtZSk7XHJcblxyXG4gICAgICAgICAgICBjb25zdCBpbXBvcnREYXRhOiBJbXBvcnREYXRhID0ge1xyXG4gICAgICAgICAgICAgICAgaW1wb3J0U3RyaW5nOiBtYXRjaFswXSxcclxuICAgICAgICAgICAgICAgIHBhdGg6IGltcG9ydE5hbWUsXHJcbiAgICAgICAgICAgICAgICBmdWxsUGF0aDogZnVsbFBhdGgsXHJcbiAgICAgICAgICAgICAgICBmb3VuZDogZmFsc2VcclxuICAgICAgICAgICAgfTtcclxuXHJcbiAgICAgICAgICAgIGF3YWl0IHRoaXMucmVzb2x2ZUltcG9ydChpbXBvcnREYXRhLCBpbmNsdWRlUGF0aHMpO1xyXG5cclxuICAgICAgICAgICAgcmV0dXJuIGltcG9ydERhdGE7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIC8vIFdhaXQgZm9yIGFsbCBpbXBvcnRzIGZpbGUgbmFtZXMgdG8gYmUgcmVzb2x2ZWRcclxuICAgICAgICBjb25zdCBpbXBvcnRzID0gYXdhaXQgUHJvbWlzZS5hbGwoaW1wb3J0c1Byb21pc2VzKTtcclxuXHJcbiAgICAgICAgY29uc3QgYnVuZGxlUmVzdWx0OiBCdW5kbGVSZXN1bHQgPSB7XHJcbiAgICAgICAgICAgIGZpbGVQYXRoOiBmaWxlUGF0aCxcclxuICAgICAgICAgICAgZm91bmQ6IHRydWVcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBjb25zdCBzaG91bGRDaGVja0ZvckRlZHVwZXMgPSBkZWR1cGVGaWxlcyAhPSBudWxsICYmIGRlZHVwZUZpbGVzLmxlbmd0aCA+IDA7XHJcblxyXG4gICAgICAgIC8vIEJ1bmRsZSBhbGwgaW1wb3J0c1xyXG4gICAgICAgIGNvbnN0IGN1cnJlbnRJbXBvcnRzOiBCdW5kbGVSZXN1bHRbXSA9IFtdO1xyXG4gICAgICAgIGZvciAoY29uc3QgaW1wIG9mIGltcG9ydHMpIHtcclxuICAgICAgICAgICAgbGV0IGNvbnRlbnRUb1JlcGxhY2U7XHJcblxyXG4gICAgICAgICAgICBsZXQgY3VycmVudEltcG9ydDogQnVuZGxlUmVzdWx0O1xyXG5cclxuICAgICAgICAgICAgLy8gSWYgbmVpdGhlciBpbXBvcnQgZmlsZSwgbm9yIHBhcnRpYWwgaXMgZm91bmRcclxuICAgICAgICAgICAgaWYgKCFpbXAuZm91bmQpIHtcclxuICAgICAgICAgICAgICAgIC8vIEFkZCBlbXB0eSBidW5kbGUgcmVzdWx0IHdpdGggZm91bmQ6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50SW1wb3J0ID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpbGVQYXRoOiBpbXAuZnVsbFBhdGgsXHJcbiAgICAgICAgICAgICAgICAgICAgZm91bmQ6IGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuZmlsZVJlZ2lzdHJ5W2ltcC5mdWxsUGF0aF0gPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgLy8gSWYgZmlsZSBpcyBub3QgeWV0IGluIHRoZSByZWdpc3RyeVxyXG4gICAgICAgICAgICAgICAgLy8gUmVh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mNyZW1lbnQgaXQncyB1c2FnZSBjb3VudFxyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudXNlZEltcG9ydHMgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXNlZEltcG9ydHNbaW1wLmZ1bGxQYXRoXSsrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgY2hpbGQgaW1wb3J0cywgaWYgdGhlcmUgYXJlIGFueVxyXG4gICAgICAgICAgICAgICAgbGV0IGNoaWxkSW1wb3J0czogQnVuZGxlUmVzdWx0W10gPSBbXTtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmltcG9ydHNCeUZpbGUgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNoaWxkSW1wb3J0cyA9IHRoaXMuaW1wb3J0c0J5RmlsZVtpbXAuZnVsbFBhdGhdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIENvbnN0cnVjdCBhbmQgYWRkIHJlc3VsdCB0byBjdXJyZW50IGltcG9ydHNcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZVBhdGg6IGltcC5mdWxsUGF0aCxcclxuICAgICAgICAgICAgICAgICAgICBmb3VuZDogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICBpbXBvcnRzOiBjaGlsZEltcG9ydHNcclxuICAgICAgICAgICAgICAgIH07XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIFRha2UgY29udGVudFRvUmVwbGFjZSBmcm9tIHRoZSBmaWxlUmVnaXN0cnlcclxuICAgICAgICAgICAgY29udGVudFRvUmVwbGFjZSA9IHRoaXMuZmlsZVJlZ2lzdHJ5W2ltcC5mdWxsUGF0aF07XHJcblxyXG4gICAgICAgICAgICAvLyBJZiB0aGUgY29udGVudCBpcyBub3QgZm91bmRcclxuICAgICAgICAgICAgaWYgKGNvbnRlbnRUb1JlcGxhY2UgPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgLy8gSW5kaWNhdGUgdGhpcyB3aXRoIGEgY29tbWVudCBmb3IgZWFzaWVyIGRlYnVnZ2luZ1xyXG4gICAgICAgICAgICAgICAgY29udGVudFRvUmVwbGFjZSA9IGAvKioqIElNUE9SVEVEIEZJTEUgTk9UIEZPVU5EICoqKi8ke29zLkVPTH0ke2ltcC5pbXBvcnRTdHJpbmd9LyoqKiAtLS0gKioqL2A7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIElmIHVzZWRJbXBvcnRzIGRpY3Rpb25hcnkgaXMgZGVmaW5lZFxyXG4gICAgICAgICAgICBpZiAoc2hvdWxkQ2hlY2tGb3JEZWR1cGVzICYmIHRoaXMudXNlZEltcG9ydHMgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgLy8gQW5kIGN1cnJlbnQgaW1wb3J0IHBhdGggc2hvdWxkIGJlIGRlZHVwZWQgYW5kIGlzIHVzZWQgYWxyZWFkeVxyXG4gICAgICAgICAgICAgICAgY29uc3QgdGltZXNVc2VkID0gdGhpcy51c2VkSW1wb3J0c1tpbXAuZnVsbFBhdGhdO1xyXG4gICAgICAgICAgICAgICAgaWYgKGRlZHVwZUZpbGVzLmluZGV4T2YoaW1wLmZ1bGxQYXRoKSAhPT0gLTEgJiZcclxuICAgICAgICAgICAgICAgICAgICB0aW1lc1VzZWQgIT0gbnVsbCAmJlxyXG4gICAgICAgICAgICAgICAgICAgIHRpbWVzVXNlZCA+IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBSZXNldCBjb250ZW50IHRvIHJlcGxhY2UgdG8gYW4gZW1wdHkgc3RyaW5nIHRvIHNraXAgaXRcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gXCJcIjtcclxuICAgICAgICAgICAg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4gICAgICAgICAgICBDT01NRU5UX1BBVFRFUk4sXHJcbiAgICAgICAgICAgIE1VTFRJTElORV9DT01NRU5UX1BBVFRFUk5cclxuICAgICAgICBdO1xyXG5cclxuICAgICAgICBmb3IgKGNvbnN0IHBhdHRlcm4gb2YgcGF0dGVybnMpIHtcclxuICAgICAgICAgICAgdGV4dCA9IHRleHQucmVwbGFjZShwYXR0ZXJuLCB4ID0+IHgucmVwbGFjZShJTVBPUlRfUEFUVEVSTiwgXCJcIikudHJpbSgpKTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiB0ZXh0O1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYXN5bmMgcmVzb2x2ZUltcG9ydChpbXBvcnREYXRhLCBpbmNsdWRlUGF0aHMpOiBQcm9taXNlPGFueT4ge1xyXG4gICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgIGF3YWl0IGZzLmFjY2VzcyhpbXBvcnREYXRhLmZ1bGxQYXRoKTtcclxuICAgICAgICAgICAgaW1wb3J0RGF0YS5mb3VuZCA9IHRydWU7XHJcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgICAgICAgY29uc3QgdW5kZXJzY29yZWREaXJuYW1lID0gcGF0aC5kaXJuYW1lKGltcG9ydERhdGEuZnVsbFBhdGgpO1xyXG4gICAgICAgICAgICBjb25zdCB1bmRlcnNjb3JlZEJhc2VuYW1lID0gcGF0aC5iYXNlbmFtZShpbXBvcnREYXRhLmZ1bGxQYXRoKTtcclxuICAgICAgICAgICAgY29uc3QgdW5kZXJzY29yZWRGaWxlUGF0aCA9IHBhdGguam9pbih1bmRlcnNjb3JlZERpcm5hbWUsIGBfJHt1bmRlcnNjb3JlZEJhc2VuYW1lfWApO1xyXG4gICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgZnMuYWNjZXNzKHVuZGVyc2NvcmVkRmlsZVBhdGgpO1xyXG4gICAgICAgICAgICAgICAgaW1wb3J0RGF0YS5mdWxsUGF0aCA9IHVuZGVyc2NvcmVkRmlsZVBhdGg7XHJcbiAgICAgICAgICAgICAgICBpbXBvcnREYXRhLmZvdW5kID0gdHJ1ZTtcclxuICAgICAgICAgICAgfSBjYXRjaCAodW5kZXJzY29yZUVycikge1xyXG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUgYXJlIGFueSBpbmNsdWRlUGF0aHNcclxuICAgICAgICAgICAgICAgIGlmIChpbmNsdWRlUGF0aHMubGVuZ3RoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBmdWxsUGF0aCB1c2luZyBpdHMgZmlyc3QgZW50cnlcclxuICAgICAgICAgICAgICAgICAgICBpbXBvcnREYXRhLmZ1bGxQYXRoID0gcGF0aC5yZXNvbHZlKGluY2x1ZGVQYXRoc1swXSwgaW1wb3J0RGF0YS5wYXRoKTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBUcnkgcmVzb2x2aW5nIGltcG9ydCB3aXRoIHRoZSByZW1haW5pbmcgaW5jbHVkZVBhdGhzXHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVtYWluaW5nSW5jbHVkZVBhdGhzID0gaW5jbHVkZVBhdGhzLnNsaWNlKDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnJlc29sdmVJbXBvcnQoaW1wb3J0RGF0YSwgcmVtYWluaW5nSW5jbHVkZVBhdGhzKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgcmV0dXJuIGltcG9ydERhdGE7XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBhc3luYyBnbG9iRmlsZXNPckVtcHR5KGdsb2JzTGlzdDogc3RyaW5nW10pOiBQcm9taXNlPHN0cmluZ1tdPiB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHN0cmluZ1tdPigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChnbG9ic0xpc3QgPT0gbnVsbCB8fCBnbG9ic0xpc3QubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBnbG9icyhnbG9ic0xpc3QsIChlcnI6IEVycm9yLCBmaWxlczogc3RyaW5nW10pID0+IHtcclxuICAgICAgICAgICAgICAgIC8vIFJlamVjdCBpZiB0aGVyZSdzIGFuIGVycm9yXHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBmdWxsIHBhdGhzXHJcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSBmaWxlcy5tYXAoZmlsZSA9PiBwYXRoLnJlc29sdmUoZmlsZSkpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgcHJvbWlzZVxyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxufVxyXG4iXX0=

@@ -9,2 +9,2 @@ "use strict";

})(Verbosity = exports.Verbosity || (exports.Verbosity = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnRyYWN0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVFBLElBQVksU0FJWDtBQUpELFdBQVksU0FBUztJQUNqQix5Q0FBUSxDQUFBO0lBQ1IsNkNBQVUsQ0FBQTtJQUNWLGlEQUFhLENBQUE7QUFDakIsQ0FBQyxFQUpXLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBSXBCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBDb25maWcge1xyXG4gICAgRW50cnk6IHN0cmluZztcclxuICAgIERlc3RpbmF0aW9uOiBzdHJpbmc7XHJcbiAgICBWZXJib3NpdHk6IFZlcmJvc2l0eTtcclxuICAgIERlZHVwZUdsb2JzPzogc3RyaW5nW107XHJcbiAgICBJbmNsdWRlUGF0aHM/OiBzdHJpbmdbXTtcclxufVxyXG5cclxuZXhwb3J0IGVudW0gVmVyYm9zaXR5IHtcclxuICAgIE5vbmUgPSAwLFxyXG4gICAgRXJyb3JzID0gOCxcclxuICAgIFZlcmJvc2UgPSAyNTZcclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBBcmd1bWVudHNWYWx1ZXMge1xyXG4gICAgY29uZmlnPzogc3RyaW5nO1xyXG4gICAgZW50cnk6IHN0cmluZztcclxuICAgIGRlc3Q6IHN0cmluZztcclxuICAgIHZlcmJvc2l0eTogVmVyYm9zaXR5O1xyXG4gICAgZGVkdXBlPzogc3RyaW5nW107XHJcbiAgICBpbmNsdWRlUGF0aHM/OiBzdHJpbmdbXTtcclxufVxyXG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnRyYWN0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVVBLElBQVksU0FJWDtBQUpELFdBQVksU0FBUztJQUNqQix5Q0FBUSxDQUFBO0lBQ1IsNkNBQVUsQ0FBQTtJQUNWLGlEQUFhLENBQUE7QUFDakIsQ0FBQyxFQUpXLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBSXBCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgeWFyZ3MgZnJvbSBcInlhcmdzXCI7XHJcblxyXG5leHBvcnQgaW50ZXJmYWNlIENvbmZpZyB7XHJcbiAgICBFbnRyeTogc3RyaW5nO1xyXG4gICAgRGVzdGluYXRpb246IHN0cmluZztcclxuICAgIFZlcmJvc2l0eTogVmVyYm9zaXR5O1xyXG4gICAgRGVkdXBlR2xvYnM/OiBzdHJpbmdbXTtcclxuICAgIEluY2x1ZGVQYXRocz86IHN0cmluZ1tdO1xyXG59XHJcblxyXG5leHBvcnQgZW51bSBWZXJib3NpdHkge1xyXG4gICAgTm9uZSA9IDAsXHJcbiAgICBFcnJvcnMgPSA4LFxyXG4gICAgVmVyYm9zZSA9IDI1NlxyXG59XHJcblxyXG5leHBvcnQgaW50ZXJmYWNlIEFyZ3VtZW50c1ZhbHVlcyBleHRlbmRzIHlhcmdzLkFyZ3VtZW50cyB7XHJcbiAgICBjb25maWc/OiBzdHJpbmc7XHJcbiAgICBlbnRyeTogc3RyaW5nO1xyXG4gICAgZGVzdDogc3RyaW5nO1xyXG4gICAgdmVyYm9zaXR5OiBWZXJib3NpdHk7XHJcbiAgICBkZWR1cGU/OiBzdHJpbmdbXTtcclxuICAgIGluY2x1ZGVQYXRocz86IHN0cmluZ1tdO1xyXG59XHJcbiJdfQ==
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getAllMatches(text, regex) {
let matches = [];
const matches = [];
let match;

@@ -12,2 +12,2 @@ while (match = regex.exec(text)) {

exports.getAllMatches = getAllMatches;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsdUJBQThCLElBQVksRUFBRSxLQUFhO0lBQ3JELElBQUksT0FBTyxHQUFzQixFQUFFLENBQUM7SUFDcEMs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lBQ3hCLENBQUM7SUFDRCxNQUFNLENBQUMsT0FBTyxDQUFDO0FBQ25CLENBQUM7QUFQRCxzQ0FPQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBnZXRBbGxNYXRjaGVzKHRleHQ6IHN0cmluZywgcmVnZXg6IFJlZ0V4cCk6IFJlZ0V4cEV4ZWNBcnJheVtdIHtcclxuICAgIGNvbnN0IG1hdGNoZXM6IFJlZ0V4cEV4ZWNBcnJheVtdID0gW107XHJcbiAgICBsZXQgbWF0Y2g6IFJlZ0V4cEV4ZWNBcnJheTtcclxuICAgIHdoaWxlIChtYXRjaCA9IHJlZ2V4LmV4ZWModGV4dCkpIHtcclxuICAgICAgICBtYXRjaGVzLnB1c2gobWF0Y2gpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIG1hdGNoZXM7XHJcbn1cclxuIl19

@@ -11,3 +11,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("mz/fs");
const fs = require("fs-extra");
const path = require("path");

@@ -18,3 +18,2 @@ const os = require("os");

const nodeSass = require("node-sass");
const mkdirp = require("mkdirp");
const Contracts = require("./contracts");

@@ -59,3 +58,3 @@ const bundler_1 = require("./bundler");

// Ensure the directory exists
mkdirp.sync(path.dirname(this.config.Destination));
fs.mkdirpSync(path.dirname(this.config.Destination));
yield fs.writeFile(this.config.Destination, bundleResult.bundledContent);

@@ -134,2 +133,2 @@ const fullPath = path.resolve(this.config.Destination);

exports.Launcher = Launcher;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF1bmNoZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbGF1bmNoZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRCQUE0QjtBQUM1Qiw2QkFBNkI7QUFDN0IseUJBQXlCO0FBQ3pCLCtCQUErQjtBQUMvQiw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2F0ZW5hdGlvbiByZXN1bHQgaGFzIG5vIGNvbnRlbnQuYCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucmVuZGVyU2NzcyhidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQpO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChzY3NzRXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZXhpdFdpdGhFcnJvcihgW0Vycm9yXSBUaGVyZSBpcyBhbiBlcnJvciBpbiB5b3VyIHN0eWxlczoke29zLkVPTH0ke3Njc3NFcnJvcn1gKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gRW5zdXJlIHRoZSBkaXJlY3RvcnkgZXhpc3RzXHJcbiAgICAgICAgICAgIG1rZGlycC5zeW5jKHBhdGguZGlybmFtZSh0aGlzLmNvbmZpZy5EZXN0aW5hdGlvbikpO1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgZnMud3JpdGVGaWxlKHRoaXMuY29uZmlnLkRlc3RpbmF0aW9uLCBidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQpO1xyXG5cclxuICAgICAgICAgICAgY29uc3QgZnVsbFBhdGggPSBwYXRoLnJlc29sdmUodGhpcy5jb25maWcuRGVzdGluYXRpb24pO1xyXG4gICAgICAgICAgICBpZiAodGhpcy5jb25maWcuVmVyYm9zaXR5ID09PSBDb250cmFjdHMuVmVyYm9zaXR5LlZlcmJvc2UpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbyhgW0RvbmVdIEJ1bmRsZWQgaW50bzoke29zLkVPTH0ke2Z1bGxQYXRofWApO1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKGBUb3RhbCBzaXplICAgICAgIDogJHtwcmV0dHlCeX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xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZ2V0QXJjaHlEYXRhKGJ1bmRsZVJlc3VsdDogQnVuZGxlUmVzdWx0LCBzb3VyY2VEaXJlY3Rvcnk/OiBzdHJpbmcpIHtcclxuICAgICAgICBpZiAoc291cmNlRGlyZWN0b3J5ID09IG51bGwpIHtcclxuICAgICAgICAgICAgc291cmNlRGlyZWN0b3J5ID0gcHJvY2Vzcy5jd2QoKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgYXJjaHlEYXRhOiBhcmNoeS5EYXRhID0ge1xyXG4gICAgICAgICAgICBsYWJlbDogcGF0aC5yZWxhdGl2ZShzb3VyY2VEaXJlY3RvcnksIGJ1bmRsZVJlc3VsdC5maWxlUGF0aClcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBpZiAoIWJ1bmRsZVJlc3VsdC5mb3VuZCkge1xyXG4gICAgICAgICAgICBhcmNoeURhdGEubGFiZWwgKz0gYCBbTk9UIEZPVU5EXWA7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChidW5kbGVSZXN1bHQuZGVkdXBlZCkge1xyXG4gICAgICAgICAgICBhcmNoeURhdGEubGFiZWwgKz0gYCBbREVEVVBFRF1gO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKGJ1bmRsZVJlc3VsdC5pbXBvcnRzICE9IG51bGwpIHtcclxuICAgICAgICAgICAgYXJjaHlEYXRhLm5vZGVzID0gYnVuZGxlUmVzdWx0LmltcG9ydHMubWFwKHggPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHggIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldEFyY2h5RGF0YSh4LCBzb3VyY2VEaXJlY3RvcnkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiXCI7XHJcbiAgICAgICAgICAgIH0pO1x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gICBjb25zb2xlLmluZm8oYXJjaHkoYXJjaHlEYXRhKSk7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIGlmIChidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQgPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29uZmlnLlZlcmJvc2l0eSAhPT0gQ29udHJhY3RzLlZlcmJvc2l0eS5Ob25lKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5leGl0V2l0aEVycm9yKGBbRXJyb3JdIEFuIGVycm9yIGhhcyBvY2N1cmVkJHtvcy5FT0x9Q29uY2F0ZW5hdGlvbiByZXN1bHQgaGFzIG5vIGNvbnRlbnQuYCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucmVuZGVyU2NzcyhidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQpO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChzY3NzRXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZXhpdFdpdGhFcnJvcihgW0Vycm9yXSBUaGVyZSBpcyBhbiBlcnJvciBpbiB5b3VyIHN0eWxlczoke29zLkVPTH0ke3Njc3NFcnJvcn1gKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gRW5zdXJlIHRoZSBkaXJlY3RvcnkgZXhpc3RzXHJcbiAgICAgICAgICAgIGZzLm1rZGlycFN5bmMocGF0aC5kaXJuYW1lKHRoaXMuY29uZmlnLkRlc3RpbmF0aW9uKSk7XHJcblxyXG4gICAgICAgICAgICBhd2FpdCBmcy53cml0ZUZpbGUodGhpcy5jb25maWcuRGVzdGluYXRpb24sIGJ1bmRsZVJlc3VsdC5idW5kbGVkQ29udGVudCk7XHJcblxyXG4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IG5vZGVTYXNzLnJlbmRlcih7XHJcbiAgICAgICAgICAgICAgICBkYXRhOiBjb250ZW50XHJcbiAgICAgICAgICAgIH0sIChlcnJvciwgcmVzdWx0KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyb3IgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChgJHtlcnJvci5tZXNzYWdlfSBvbiBsaW5lICgke2Vycm9yLmxpbmV9LCAke2Vycm9yLmNvbHVtbn0pYCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZ2V0QXJjaHlEYXRhKGJ1bmRsZVJlc3VsdDogQnVuZGxlUmVzdWx0LCBzb3VyY2VEaXJlY3Rvcnk/OiBzdHJpbmcpOiBhcmNoeS5EYXRhIHtcclxuICAgICAgICBpZiAoc291cmNlRGlyZWN0b3J5ID09IG51bGwpIHtcclxuICAgICAgICAgICAgc291cmNlRGlyZWN0b3J5ID0gcHJvY2Vzcy5jd2QoKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgYXJjaHlEYXRhOiBhcmNoeS5EYXRhID0ge1xyXG4gICAgICAgICAgICBsYWJlbDogcGF0aC5yZWxhdGl2ZShzb3VyY2VEaXJlY3RvcnksIGJ1bmRsZVJlc3VsdC5maWxlUGF0aClcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBpZiAoIWJ1bmRsZVJlc3VsdC5mb3VuZCkge1xyXG4gICAgICAgICAgICBhcmNoeURhdGEubGFiZWwgKz0gYCBbTk9UIEZPVU5EXWA7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChidW5kbGVSZXN1bHQuZGVkdXBlZCkge1xyXG4gICAgICAgICAgICBhcmNoeURhdGEubGFiZWwgKz0gYCBbREVEVVBFRF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clxuICAgICAgICAgICAgICAgIHNhdmVkQnl0ZXMgKz0gdGhpcy5jb3VudFNhdmVkQnl0ZXNCeURlZHVwaW5nKGltcG9ydFJlc3VsdCwgZmlsZVJlZ2lzdHJ5KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gc2F2ZWRCeXRlcztcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGV4aXRXaXRoRXJyb3IobWVzc2FnZTogc3RyaW5nKTogdm9pZCB7XHJcbiAgICAgICAgaWYgKHRoaXMuY29uZmlnLlZlcmJvc2l0eSAhPT0gQ29udHJhY3RzLlZlcmJvc2l0eS5Ob25lKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IobWVzc2FnZSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHByb2Nlc3MuZXhpdCgxKTtcclxuICAgIH1cclxufVxyXG4iXX0=
{
"name": "scss-bundle",
"version": "2.1.0",
"version": "2.1.1",
"description": "Bundling SCSS files to one bundled file.",

@@ -8,9 +8,11 @@ "types": "@types/index.d.ts",

"scripts": {
"test": "tsc -p . --noEmit && npm run tslint-test",
"tslint-test": "tslint --config ./tslint.json --project . --exclude test/**/* && echo TsLint test successfully passed.",
"pretest": "npm run build -- --noEmit && npm run build-tests && npm run tslint",
"test": "jest",
"test-ci": "npm run pretest && npm run tslint && jest --maxWorkers=4 -b",
"test-watch": "start npm run build-tests -- --watchAll && jest --watchAll",
"tslint": "tslint --config ./tslint.json --project . --exclude test/**/* && echo TsLint test successfully passed.",
"build": "tsc -p . --newLine lf",
"watch": "tsc -w",
"test-scss": "node ./dist/bundle-cli.js -e ./examples/simple/main.scss -d ./examples/output/simple.scss",
"test-scss-include-paths": "node ./dist/bundle-cli.js -e ./examples/include-paths/main.scss -d ./examples/output/include-paths.scss --includePaths ./examples ./node_modules",
"prepublish": "npm run build"
"prepublishOnly": "npm run build",
"build-tests": "test-generator-cli"
},

@@ -36,11 +38,15 @@ "keywords": [

"devDependencies": {
"@types/archy": "0.0.30",
"@types/mkdirp": "^0.3.29",
"@types/mz": "0.0.30",
"@types/node": "^7.0.8",
"@simplrjs/test-generator-cli": "^0.1.2",
"@types/archy": "0.0.31",
"@types/fs-extra": "^5.0.0",
"@types/jest": "^22.0.1",
"@types/node": "^8.5.7",
"@types/node-sass": "3.10.32",
"@types/promise": "^7.1.27",
"@types/yargs": "6.6.0",
"tslint": "^4.5.1",
"typescript": "^2.2.2"
"@types/promise": "^7.1.30",
"@types/yargs": "10.0.1",
"jest": "^22.0.4",
"simplr-tslint": "0.0.1",
"ts-jest": "^22.0.1",
"tslint": "^5.8.0",
"typescript": "^2.6.2"
},

@@ -52,10 +58,36 @@ "bin": {

"archy": "^1.0.0",
"fs-extra": "^5.0.0",
"globs": "^0.1.3",
"mkdirp": "^0.5.1",
"mz": "^2.6.0",
"node-sass": "^4.5.0",
"node-sass": "^4.7.2",
"pretty-bytes": "^4.0.2",
"promise": "^7.1.1",
"yargs": "^7.0.2"
"promise": "^8.0.1",
"yargs": "^10.0.3"
},
"jest": {
"collectCoverage": true,
"mapCoverage": true,
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"globals": {
"ts-jest": {
"skipBabel": true,
"tsConfigFile": "tests/tsconfig.json"
}
},
"testRegex": "/__tests__/.*\\.(test|spec).(ts|tsx|js)$",
"moduleNameMapper": {
"@src/(.*)": "<rootDir>/src/$1"
},
"coveragePathIgnorePatterns": [
"/node_modules/",
"/tests/"
],
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"verbose": true
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc