scss-bundle
Advanced tools
Comparing version 2.0.1-beta.7 to 2.1.0
@@ -23,5 +23,6 @@ export interface FileRegistry { | ||
BundleAll(files: string[], dedupeGlobs: string[]): Promise<BundleResult[]>; | ||
Bundle(file: string, dedupeGlobs?: string[]): Promise<BundleResult>; | ||
private bundle(filePath, content, dedupeFiles); | ||
Bundle(file: string, dedupeGlobs?: string[], includePaths?: string[]): Promise<BundleResult>; | ||
private bundle(filePath, content, dedupeFiles, includePaths); | ||
private resolveImport(importData, includePaths); | ||
private globFilesOrEmpty(globsList); | ||
} |
@@ -6,2 +6,3 @@ export interface Config { | ||
DedupeGlobs?: string[]; | ||
IncludePaths?: string[]; | ||
} | ||
@@ -19,2 +20,3 @@ export declare enum Verbosity { | ||
dedupe?: string[]; | ||
includePaths?: string[]; | ||
} |
@@ -36,2 +36,6 @@ "use strict"; | ||
}) | ||
.options("includePaths", { | ||
describe: "Include paths for resolving imports.", | ||
type: "array" | ||
}) | ||
.array(DEDUPE_KEY) | ||
@@ -42,2 +46,2 @@ .default(DEDUPE_KEY, [], "[]") | ||
.argv; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJndW1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FyZ3VtZW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLCtCQUErQjtBQUUvQix5Q0FBeUM7QUFFekMsSUFBSSxlQUFlLEdBQWEsRUFBRSxDQUFDO0FBQ25DLEdBQUcsQ0FBQyxDQUFDLElBQUksR0FBRyxJQUFJLFNBQVMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO0lBQ2xDLEVBQUUsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUN4QixlQUFlLENBQUMsSUFBSSxDQUFDLEdBQUcsQ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XSlcclxuICAgIC5hcmd2IGFzIENvbnRyYWN0cy5Bcmd1bWVudHNWYWx1ZXM7XHJcbiJdfQ== |
@@ -29,3 +29,4 @@ #!/usr/bin/env node | ||
DedupeGlobs: argumentValues.dedupe, | ||
Verbosity: this.resolveVerbosity(argumentValues.verbosity) | ||
Verbosity: this.resolveVerbosity(argumentValues.verbosity), | ||
IncludePaths: argumentValues.includePaths | ||
}; | ||
@@ -41,2 +42,2 @@ } | ||
new BundleCli(arguments_1.argv); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLWNsaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9idW5kbGUtY2xpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBRUEseUNBQXlDO0FBQ3pDLDJDQUFtQztBQUNuQyx5Q0FBc0M7QUFFdEM7SUFDSSxZQUFZLGNBQXlDO1FBQ2pELElBQUksQ0FBQyxNQUFNLENBQUMsY0FBYyxDQUFDLENBQUM7SUFDaEMsQ0FBQztJQUVhLE1BQU0sQ0FBQyxjQUF5Qzs7WUFDMUQsTUFBTSxJQUFJLG1CQUFRLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsQ0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBQ2hFLENBQUM7S0FBQTtJQUVPLFNBQVMsQ0FBQyxjQUF5QztRQUN2RCxNQUFNLENBQUM7WUFDSCxXQUFXLEVBQUUsY0FBYyxDQUFDLElBQUk7WUFDaEMsS0FBSyxFQUFFLGNBQWMsQ0FBQyxLQUFLO1lBQzNCLFdBQVcsRUFBRSxjQUFjLENBQUMsTUFBTTtZQUNsQyxTQUFTLEVBQUUsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGNBQWMsQ0FBQyxTQUFTLENBQUM7U0FDN0QsQ0FBQztJQUNOLENBQUM7S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gaXMgdXNlZCBiZWNhdXNlIFR5cGVTY3JpcHQgdGhpbmtzXHJcbiAgICAgICAgLy8gIHRoYXQgd2UgY2FzdCBzdHJpbmcgdG8gbnVtYmVyLCBldmVuIHRob3VnaCB3ZSBnZXQgYSBudW1iZXIgdGhlcmVcclxuICAgICAgICByZXR1cm4gQ29udHJhY3RzLlZlcmJvc2l0eVt2ZXJib3NpdHldIGFzIGFueSBhcyBudW1iZXI7XHJcbiAgICB9XHJcbn1cclxuXHJcbm5ldyBCdW5kbGVDbGkoYXJndik7XHJcbiJdfQ== |
@@ -33,3 +33,3 @@ "use strict"; | ||
} | ||
Bundle(file, dedupeGlobs = []) { | ||
Bundle(file, dedupeGlobs = [], includePaths = []) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -42,3 +42,3 @@ try { | ||
const [content, dedupeFiles] = yield Promise.all([contentPromise, dedupeFilesPromise]); | ||
return yield this.bundle(file, content, dedupeFiles); | ||
return yield this.bundle(file, content, dedupeFiles, includePaths); | ||
} | ||
@@ -53,3 +53,3 @@ catch (error) { | ||
} | ||
bundle(filePath, content, dedupeFiles) { | ||
bundle(filePath, content, dedupeFiles, includePaths) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -78,20 +78,3 @@ // Remove commented imports | ||
}; | ||
try { | ||
yield fs.access(fullPath); | ||
importData.found = true; | ||
} | ||
catch (error) { | ||
const underscoredDirname = path.dirname(fullPath); | ||
const underscoredBasename = path.basename(fullPath); | ||
const underscoredFilePath = path.join(underscoredDirname, `_${underscoredBasename}`); | ||
try { | ||
yield fs.access(underscoredFilePath); | ||
importData.fullPath = underscoredFilePath; | ||
importData.found = true; | ||
} | ||
catch (underscoreErr) { | ||
// Neither file, nor partial was found | ||
// Skipping... | ||
} | ||
} | ||
yield this.resolveImport(importData, includePaths); | ||
return importData; | ||
@@ -124,3 +107,3 @@ })); | ||
// and bundle it | ||
let bundledImport = yield this.bundle(imp.fullPath, impContent, dedupeFiles); | ||
let bundledImport = yield this.bundle(imp.fullPath, impContent, dedupeFiles, includePaths); | ||
// Then add its bundled content to the registry | ||
@@ -187,2 +170,31 @@ this.fileRegistry[imp.fullPath] = bundledImport.bundledContent; | ||
} | ||
resolveImport(importData, includePaths) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
try { | ||
yield fs.access(importData.fullPath); | ||
importData.found = true; | ||
} | ||
catch (error) { | ||
const underscoredDirname = path.dirname(importData.fullPath); | ||
const underscoredBasename = path.basename(importData.fullPath); | ||
const underscoredFilePath = path.join(underscoredDirname, `_${underscoredBasename}`); | ||
try { | ||
yield fs.access(underscoredFilePath); | ||
importData.fullPath = underscoredFilePath; | ||
importData.found = true; | ||
} | ||
catch (underscoreErr) { | ||
// If there are any includePaths | ||
if (includePaths.length) { | ||
// Resolve fullPath using its first entry | ||
importData.fullPath = path.resolve(includePaths[0], importData.path); | ||
// Try resolving import with the remaining includePaths | ||
const remainingIncludePaths = includePaths.slice(1); | ||
return this.resolveImport(importData, remainingIncludePaths); | ||
} | ||
} | ||
} | ||
return importData; | ||
}); | ||
} | ||
globFilesOrEmpty(globsList) { | ||
@@ -210,2 +222,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
exports.Bundler = Bundler; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9idW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSw0QkFBNEI7QUFDNUIseUJBQXlCO0FBQ3pCLDZCQUE2QjtBQUM3QiwrQkFBK0I7QUFFL0IscUNBQXFDO0FBRXJDLE1BQU0sY0FBYyxHQUFHLHdCQUF3QixDQUFDO0FBQ2hELE1BQU0sd0JBQXdCLEdBQUcsc0JBQXNCLENBQUM7QUFDeEQsTUFBTSxjQUFjLEdBQUcsT0FBTyxDQUFDO0FBdU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ICAgICAgICAgIGlmIChpbXBvcnROYW1lLmluZGV4T2YoRklMRV9FWFRFTlNJT04pID09PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgaW1wb3J0TmFtZSArPSBGSUxFX0VYVEVOU0lPTjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb25zdCBmdWxsUGF0aCA9IHBhdGgucmVzb2x2ZShkaXJuYW1lLCBpbXBvcnROYW1lKTtcclxuXHJcbiAgICAgICAgICAgIGNvbnN0IGltcG9ydERhdGE6IEltcG9ydERhdGEgPSB7XHJcbiAgICAgICAgICAgICAgICBpbXBvcnRTdHJpbmc6IG1hdGNoWzBdLFxyXG4gICAgICAgICAgICAgICAgcGF0aDogaW1wb3J0TmFtZSxcclxuICAgICAgICAgICAgICAgIGZ1bGxQYXRoOiBmdWxsUGF0aCxcclxuICAgICAgICAgICAgICAgIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IGZzLmFjY2VzcyhmdWxsUGF0aCk7XHJcbiAgICAgICAgICAgICAgICBpbXBvcnREYXRhLmZvdW5kID0gdHJ1ZTtcclxuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHVuZGVyc2NvcmVkRGlybmFtZSA9IHBhdGguZGlybmFtZShmdWxsUGF0aCk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCB1bmRlcnNjb3JlZEJhc2VuYW1lID0gcGF0aC5iYXNlbmFtZShmdWxsUGF0aCk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCB1bmRlcnNjb3JlZEZpbGVQYXRoID0gcGF0aC5qb2luKHVuZGVyc2NvcmVkRGlybmFtZSwgYF8ke3VuZGVyc2NvcmVkQmFzZW5hbWV9YCk7XHJcbiAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgIGF3YW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IGltcCBvZiBpbXBvcnRzKSB7XHJcbiAgICAgICAgICAgIGxldCBjb250ZW50VG9SZXBsYWNlO1xyXG5cclxuICAgICAgICAgICAgbGV0IGN1cnJlbnRJbXBvcnQ6IEJ1bmRsZVJlc3VsdDtcclxuXHJcbiAgICAgICAgICAgIC8vIElmIG5laXRoZXIgaW1wb3J0IGZpbGUsIG5vciBwYXJ0aWFsIGlzIGZvdW5kXHJcbiAgICAgICAgICAgIGlmICghaW1wLmZvdW5kKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBBZGQgZW1wdHkgYnVuZGxlIHJlc3VsdCB3aXRoIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgY3VycmVudEltcG9ydCA9IHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlUGF0aDogaW1wLmZ1bGxQYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmZpbGVSZWdpc3RyeVtpbXAuZnVsbFBhdGhdID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIC8vIElmIGZpbGUgaXMgbm90IHlldCBpbiB0aGUgcmVnaXN0cnlcclxuICAgICAgICAgICAgICAgIC8vIFJlYWRcclxuICAgICAgICAgICAgICAgIGxldCBpbXBDb250ZW50ID0gYXdhaXQgZnMucmVhZEZpbGUoaW1wLmZ1bGxQYXRoLCBcInV0Zi04XCIpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGFuZCBidW5kbGUgaXRcclxuICAgICAgICAgICAgICAgIGxldCBidW5kbGVkSW1wb3J0ID0gYXdhaXQgdGhpcy5idW5kbGUoaW1wLmZ1bGxQYXRoLCBpbXBDb250ZW50LCBkZWR1cGVGaWxlcyk7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gVGhlbiBhZGQgaXRzIGJ1bmRsZWQgY29udGVudCB0byB0aGUgcmVnaXN0cnlcclxuICAgICAgICAgICAgICAgIHRoaXMuZmlsZVJlZ2lzdHJ5W2ltcC5mdWxsUGF0aF0gPSBidW5kbGVkSW1wb3J0LmJ1bmRsZWRDb250ZW50O1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIEFkZCBpdCB0byB1c2VkIGltcG9ydHMsIGlmIGl0J3Mgbm90IHRoZXJlXHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy51c2VkSW1wb3J0cyAhPSBudWxsICYmIHRoaXMudXNlZEltcG9ydHNbaW1wLmZ1bGxQYXRoXSA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51c2VkSW1wb3J0c1tpbXAuZnVsbFBhdGhdID0gMTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBBbmQgd2hvbGUgQnVuZGxlUmVzdWx0IHRvIGN1cnJlbnQgaW1wb3J0c1xyXG4gICAgICAgICAgICAgICAgY3VycmVudEltcG9ydCA9IGJ1bmRsZWRJbXBvcnQ7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAvLyBGaWxlIGlzIGluIHRoZSByZWdpc3RyeVxyXG4gICAgICAgICAgICAgICAgLy8gSW5jcmVtZW50IGl0J3MgdXNhZ2UgY291bnRcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnVzZWRJbXBvcnRzICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnVzZWRJbXBvcnRzW2ltcC5mdWxsUGF0aF0rKztcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBSZXNvbHZlIGNoaWxkIGltcG9ydHMsIGlmIHRoZXJlIGFyZSBhbnlcclxuICAgICAgICAgICAgICAgIGxldCBjaGlsZEltcG9ydHM6IEJ1bmRsZVJlc3VsdFtdID0gW107XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5pbXBvcnRzQnlGaWxlICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICBjaGlsZEltcG9ydHMgPSB0aGlzLmltcG9ydHNCeUZpbGVbaW1wLmZ1bGxQYXRoXTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBDb25zdHJ1Y3QgYW5kIGFkZCByZXN1bHQgdG8gY3VycmVudCBpbXBvcnRzXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50SW1wb3J0ID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpbGVQYXRoOiBpbXAuZnVsbFBhdGgsXHJcbiAgICAgICAgICAgICAgICAgICAgZm91bmQ6IHRydWUsXHJcbiAgICAgICAgICAgICAgICAgICAgaW1wb3J0czogY2hpbGRJbXBvcnRzXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBUYWtlIGNvbnRlbnRUb1JlcGxhY2UgZnJvbSB0aGUgZmlsZVJlZ2lzdHJ5XHJcbiAgICAgICAgICAgIGNvbnRlbnRUb1JlcGxhY2UgPSB0aGlzLmZpbGVSZWdpc3RyeVtpbXAuZnVsbFBhdGhdO1xyXG5cclxuICAgICAgICAgICAgLy8gSWYgdGhlIGNvbnRlbnQgaXMgbm90IGZvdW5kXHJcbiAgICAgICAgICAgIGlmIChjb250ZW50VG9SZXBsYWNlID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIC8vIEluZGljYXRlIHRoaXMgd2l0aCBhIGNvbW1lbnQgZm9yIGVhc2llciBkZWJ1Z2dpbmdcclxuICAgICAgICAgICAgICAgIGNvbnRlbnRUb1JlcGxhY2UgPSBgLyoqKiBJTVBPUlRFRCBGSUxFIE5PVCBGT1VORCAqKiovJHtvcy5FT0x9JHtpbXAuaW1wb3J0U3RyaW5nfS8qKiogLS0tICoqKi9gO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBJZiB1c2VkSW1wb3J0cyBkaWN0aW9uYXJ5IGlzIGRlZmluZWRcclxuICAgICAgICAgICAgaWYgKHNob3VsZENoZWNrRm9yRGVkdXBlcyAmJiB0aGlzLnVzZWRJbXBvcnRzICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIC8vIEFuZCBjdXJyZW50IGltcG9ydCBwYXRoIHNob3VsZCBiZSBkZWR1cGVkIGFuZCBpcyB1c2VkIGFscmVhZHlcclxuICAgICAgICAgICAgICAgIGNvbnN0IHRpbWVzVXNlZCA9IHRoaXMudXNlZEltcG9ydHNbaW1wLmZ1bGxQYXRoXTtcclxuICAgICAgICAgICAgICAgIGlmIChkZWR1cGVGaWxlcy5pbmRleE9mKGltcC5mdWxsUGF0aCkgIT09IC0xICYmXHJcbiAgICAgICAgICAgICAgICAgICAgdGltZXNVc2VkICE9IG51bGwgJiZcclxuICAgICAgICAgICAgICAgICAgICB0aW1lc1VzZWQgPiAxKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gUmVzZXQgY29udGVudCB0byByZXBsYWNlIHRvIGFuIGVtcHR5IHN0cmluZyB0byBza2lwIGl0XHJcbiAgICAgICAgICAgICAgICAgICAgY29udGVudFRvUmVwbGFjZSA9IFwiXCI7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gQW5kIGluZGljYXRlIHRoYXQgaW1wb3J0IHdhcyBkZWR1cGVkXHJcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudEltcG9ydC5kZWR1cGVkID0gdHJ1ZTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gRmluYWxseSwgcmVwbGFjZSBpbXBvcnQgc3RyaW5nIHdpdGggYnVuZGxlZCBjb250ZW50IG9yIGEgZGVidWcgbWVzc2FnZVxyXG4gICAgICAgICAgICBjb250ZW50ID0gY29udGVudC5yZXBsYWNlKGltcC5pbXBvcnRTdHJpbmcsIGNvbnRlbnRUb1JlcGxhY2UpO1xyXG5cclx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ICAgICBmaWxlUGF0aDogaW1wLmZ1bGxQYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmZpbGVSZWdpc3RyeVtpbXAuZnVsbFBhdGhdID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIC8vIElmIGZpbGUgaXMgbm90IHlldCBpbiB0aGUgcmVnaXN0cnlcclxuICAgICAgICAgICAgICAgIC8vIFJlYWRcclxuICAgICAgICAgICAgICAgIGxldCBpbXBDb250ZW50ID0gYXdhaXQgZnMucmVhZEZpbGUoaW1wLmZ1bGxQYXRoLCBcInV0Zi04XCIpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIGFuZCBidW5kbGUgaXRcclxuICAgICAgICAgICAgICAgIGxldCBidW5kbGVkSW1wb3J0ID0gYXdhaXQgdGhpcy5idW5kbGUoaW1wLmZ1bGxQYXRoLCBpbXBDb250ZW50LCBkZWR1cGVGaWxlcywgaW5jbHVkZVBhdGhzKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBUaGVuIGFkZCBpdHMgYnVuZGxlZCBjb250ZW50IHRvIHRoZSByZWdpc3RyeVxyXG4gICAgICAgICAgICAgICAgdGhpcy5maWxlUmVnaXN0cnlbaW1wLmZ1bGxQYXRoXSA9IGJ1bmRsZWRJbXBvcnQuYnVuZGxlZENvbnRlbnQ7XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQWRkIGl0IHRvIHVzZWQgaW1wb3J0cywgaWYgaXQncyBub3QgdGhlcmVcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnVzZWRJbXBvcnRzICE9IG51bGwgJiYgdGhpcy51c2VkSW1wb3J0c1tpbXAuZnVsbFBhdGhdID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLnVzZWRJbXBvcnRzW2ltcC5mdWxsUGF0aF0gPSAxO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIEFuZCB3aG9sZSBCdW5kbGVSZXN1bHQgdG8gY3VycmVudCBpbXBvcnRzXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50SW1wb3J0ID0gYnVuZGxlZEltcG9ydDtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIC8vIEZpbGUgaXMgaW4gdGhlIHJlZ2lzdHJ5XHJcbiAgICAgICAgICAgICAgICAvLyBJbmNyZW1lbnQgaXQncyB1c2FnZSBjb3VudFxyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudXNlZEltcG9ydHMgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXNlZEltcG9ydHNbaW1wLmZ1bGxQYXRoXSsrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgY2hpbGQgaW1wb3J0cywgaWYgdGhlcmUgYXJlIGFueVxyXG4gICAgICAgICAgICAgICAgbGV0IGNoaWxkSW1wb3J0czogQnVuZGxlUmVzdWx0W10gPSBbXTtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmltcG9ydHNCeUZpbGUgIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGNoaWxkSW1wb3J0cyA9IHRoaXMuaW1wb3J0c0J5RmlsZVtpbXAuZnVsbFBhdGhdO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIENvbnN0cnVjdCBhbmQgYWRkIHJlc3VsdCB0byBjdXJyZW50IGltcG9ydHNcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZVBhdGg6IGltcC5mdWxsUGF0aCxcclxuICAgICAgICAgICAgICAgICAgICBmb3VuZDogdHJ1ZSxcclxuICAgICAgICAgICAgICAgICAgICB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gLTEgJiZcclxuICAgICAgICAgICAgICAgICAgICB0aW1lc1VzZWQgIT0gbnVsbCAmJlxyXG4gICAgICAgICAgICAgICAgICAgIHRpbWVzVXNlZCA+IDEpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBSZXNldCBjb250ZW50IHRvIHJlcGxhY2UgdG8gYW4gZW1wdHkgc3RyaW5nIHRvIHNraXAgaXRcclxuICAgICAgICAgICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gXCJcIjtcclxuICAgICAgICAgICAgICAgICAgICAvLyBBbmQgaW5kaWNhdGUgdGhhdCBpbXBvcnQgd2FzIGRlZHVwZWRcclxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50SW1wb3J0LmRlZHVwZWQgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAvLyBGaW5hbGx5LCByZXBsYWNlIGltcG9ydCBzdHJpbmcgd2l0aCBidW5kbGVkIGNvbnRlbnQgb3IgYSBkZWJ1ZyBtZXNzYWdlXHJcbiAgICAgICAgICAgIGNvbnRlbnQgPSBjb250ZW50LnJlcGxhY2UoaW1wLmltcG9ydFN0cmluZywgY29udGVudFRvUmVwbGFjZSk7XHJcblxyXG4gICAgICAgICAgICAvLyBBbmQgcHVzaCBjdXJyZW50IGltcG9ydCBpbnRvIHRoZSBsaXN0XHJcbiAgICAgICAgICAgIGN1cnJlbnRJbXBvcnRzLnB1c2goY3VycmVudEltcG9ydCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBTZXQgcmVzdWx0IHByb3BlcnRpZXNcclxuICAgICAgICBidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQgPSBjb250ZW50O1xyXG4gICAgICAgIGJ1bmRsZVJlc3VsdC5pbXBvcnRzID0gY3VycmVudEltcG9ydHM7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLmltcG9ydHNCeUZpbGUgIT0gbnVsbCkge1x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GFyZSBhbnkgaW5jbHVkZVBhdGhzXHJcbiAgICAgICAgICAgICAgICBpZiAoaW5jbHVkZVBhdGhzLmxlbmd0aCkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgZnVsbFBhdGggdXNpbmcgaXRzIGZpcnN0IGVudHJ5XHJcbiAgICAgICAgICAgICAgICAgICAgaW1wb3J0RGF0YS5mdWxsUGF0aCA9IHBhdGgucmVzb2x2ZShpbmNsdWRlUGF0aHNbMF0sIGltcG9ydERhdGEucGF0aCk7XHJcbiAgICAgICAgICAgICAgICAgICAgLy8gVHJ5IHJlc29sdmluZyBpbXBvcnQgd2l0aCB0aGUgcmVtYWluaW5nIGluY2x1ZGVQYXRoc1xyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlbWFpbmluZ0luY2x1ZGVQYXRocyA9IGluY2x1ZGVQYXRocy5zbGljZSgxKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZXNvbHZlSW1wb3J0KGltcG9ydERhdGEsIHJlbWFpbmluZ0luY2x1ZGVQYXRocyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBpbXBvcnREYXRhO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYXN5bmMgZ2xvYkZpbGVzT3JFbXB0eShnbG9ic0xpc3Q6IHN0cmluZ1tdKSB7XHJcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlPHN0cmluZ1tdPigocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChnbG9ic0xpc3QgPT0gbnVsbCB8fCBnbG9ic0xpc3QubGVuZ3RoID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZXNvbHZlKFtdKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBnbG9icyhnbG9ic0xpc3QsIChlcnI6IEVycm9yLCBmaWxlczogc3RyaW5nW10pID0+IHtcclxuICAgICAgICAgICAgICAgIC8vIFJlamVjdCBpZiB0aGVyZSdzIGFuIGVycm9yXHJcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBmdWxsIHBhdGhzXHJcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSBmaWxlcy5tYXAoZmlsZSA9PiBwYXRoLnJlc29sdmUoZmlsZSkpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgcHJvbWlzZVxyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxufVxyXG4iXX0= |
@@ -9,2 +9,2 @@ "use strict"; | ||
})(Verbosity = exports.Verbosity || (exports.Verbosity = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnRyYWN0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQU9BLElBQVksU0FJWDtBQUpELFdBQVksU0FBUztJQUNqQix5Q0FBUSxDQUFBO0lBQ1IsNkNBQVUsQ0FBQTtJQUNWLGlEQUFhLENBQUE7QUFDakIsQ0FBQyxFQUpXLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBSXBCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBDb25maWcge1xyXG4gICAgRW50cnk6IHN0cmluZztcclxuICAgIERlc3RpbmF0aW9uOiBzdHJpbmc7XHJcbiAgICBWZXJib3NpdHk6IFZlcmJvc2l0eTtcclxuICAgIERlZHVwZUdsb2JzPzogc3RyaW5nW107XHJcbn1cclxuXHJcbmV4cG9ydCBlbnVtIFZlcmJvc2l0eSB7XHJcbiAgICBOb25lID0gMCxcclxuICAgIEVycm9ycyA9IDgsXHJcbiAgICBWZXJib3NlID0gMjU2XHJcbn1cclxuXHJcbmV4cG9ydCBpbnRlcmZhY2UgQXJndW1lbnRzVmFsdWVzIHtcclxuICAgIGNvbmZpZz86IHN0cmluZztcclxuICAgIGVudHJ5OiBzdHJpbmc7XHJcbiAgICBkZXN0OiBzdHJpbmc7XHJcbiAgICB2ZXJib3NpdHk6IFZlcmJvc2l0eTtcclxuICAgIGRlZHVwZT86IHN0cmluZ1tdO1xyXG59XHJcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnRyYWN0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVFBLElBQVksU0FJWDtBQUpELFdBQVksU0FBUztJQUNqQix5Q0FBUSxDQUFBO0lBQ1IsNkNBQVUsQ0FBQTtJQUNWLGlEQUFhLENBQUE7QUFDakIsQ0FBQyxFQUpXLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBSXBCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBDb25maWcge1xyXG4gICAgRW50cnk6IHN0cmluZztcclxuICAgIERlc3RpbmF0aW9uOiBzdHJpbmc7XHJcbiAgICBWZXJib3NpdHk6IFZlcmJvc2l0eTtcclxuICAgIERlZHVwZUdsb2JzPzogc3RyaW5nW107XHJcbiAgICBJbmNsdWRlUGF0aHM/OiBzdHJpbmdbXTtcclxufVxyXG5cclxuZXhwb3J0IGVudW0gVmVyYm9zaXR5IHtcclxuICAgIE5vbmUgPSAwLFxyXG4gICAgRXJyb3JzID0gOCxcclxuICAgIFZlcmJvc2UgPSAyNTZcclxufVxyXG5cclxuZXhwb3J0IGludGVyZmFjZSBBcmd1bWVudHNWYWx1ZXMge1xyXG4gICAgY29uZmlnPzogc3RyaW5nO1xyXG4gICAgZW50cnk6IHN0cmluZztcclxuICAgIGRlc3Q6IHN0cmluZztcclxuICAgIHZlcmJvc2l0eTogVmVyYm9zaXR5O1xyXG4gICAgZGVkdXBlPzogc3RyaW5nW107XHJcbiAgICBpbmNsdWRlUGF0aHM/OiBzdHJpbmdbXTtcclxufVxyXG4iXX0= |
@@ -29,3 +29,3 @@ "use strict"; | ||
const bundler = new bundler_1.Bundler(fileRegistry); | ||
const bundleResult = yield bundler.Bundle(this.config.Entry, this.config.DedupeGlobs); | ||
const bundleResult = yield bundler.Bundle(this.config.Entry, this.config.DedupeGlobs, this.config.IncludePaths); | ||
if (!bundleResult.found) { | ||
@@ -132,2 +132,2 @@ if (this.config.Verbosity !== Contracts.Verbosity.None) { | ||
exports.Launcher = Launcher; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF1bmNoZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbGF1bmNoZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRCQUE0QjtBQUM1Qiw2QkFBNkI7QUFDN0IseUJBQXlCO0FBQ3pCLCtCQUErQjtBQUMvQiw0Q0FBNEM7QUFFNUMsc0NBQXNDO0FBQ3RDLGlDQUFpQztBQUVqQyx5Q0FBeUM7QUFDekMsdUNBQWdFO0FBRWhFO0lBQ0ksWUFBb0IsTUFBd0I7UUFBeEIsV0FBTSxHQUFOLE1BQU0sQ0FBa0I7SUFBSSxDQUFDO0lBRXBDLE1BQU07O1lBQ2YsSUFBSSxDQUFDO2dCQUNELE1BQU0sWUFBWSxHQUFpQixFQUFFLENBQUM7Z0JBQ3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vck1lc3NhZ2UpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAodGhpcy5jb25maWcuVmVyYm9zaXR5ID09PSBDb250cmFjdHMuVmVyYm9zaXR5LlZlcmJvc2UpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbyhcIkltcG9ydHMgdHJlZTpcIik7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBhcmNoeURhdGEgPSB0aGlzLmdldEFyY2h5RGF0YShidW5kbGVSZXN1bHQsIHBhdGguZGlybmFtZSh0aGlzLmNvbmZpZy5FbnRyeSkpO1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKGFyY2h5KGFyY2h5RGF0YSkpO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICBpZiAoYnVuZGxlUmVzdWx0LmJ1bmRsZWRDb250ZW50ID09IG51bGwpIHtcclxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvbmZpZy5WZXJib3NpdHkgIT09IENvbnRyYWN0cy5WZXJib3NpdHkuTm9uZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhpdFdpdGhFcnJvcihgW0Vycm9yXSBBbiBlcnJvciBoYXMgb2NjdXJlZCR7b3MuRU9MfUNvbmNhdGVuYXRpb24gcmVzdWx0IGhhcyBubyBjb250ZW50LmApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnJlbmRlclNjc3MoYnVuZGxlUmVzdWx0LmJ1bmRsZWRDb250ZW50KTtcclxuICAgICAgICAgICAgfSBjYXRjaCAoc2Nzc0Vycm9yKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmV4aXRXaXRoRXJyb3IoYFtFcnJvcl0gVGhl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vc2l0eSAhPT0gQ29udHJhY3RzLlZlcmJvc2l0eS5Ob25lKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmV4aXRXaXRoRXJyb3IoYFtFcnJvcl0gQW4gZXJyb3IgaGFzIG9jY3VyZWQke29zLkVPTH0ke2Vycm9yfWApO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYXN5bmMgcmVuZGVyU2Nzcyhjb250ZW50OiBzdHJpbmcpIHtcclxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgICAgICBub2RlU2Fzcy5yZW5kZXIoe1xyXG4gICAgICAgICAgICAgICAgZGF0YTogY29udGVudFxyXG4gICAgICAgICAgICB9LCAoZXJyb3IsIHJlc3VsdCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKGVycm9yICE9IG51bGwpIHtcclxuICAgICAgICAgICAgICAgICAgICByZWplY3QoYCR7ZXJyb3IubWVzc2FnZX0gb24gbGluZSAoJHtlcnJvci5saW5lfSwgJHtlcnJvci5jb2x1bW59KWApO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGdldEFyY2h5RGF0YShidW5kbGVSZXN1bHQ6IEJ1bmRsZVJlc3VsdCwgc291cmNlRGlyZWN0b3J5Pzogc3RyaW5nKSB7XHJcbiAgICAgICAgaWYgKHNvdXJjZURpcmVjdG9yeSA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgIHNvdXJjZURpcmVjdG9yeSA9IHByb2Nlc3MuY3dkKCk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvbnN0IGFyY2h5RGF0YTogYXJjaHkuRGF0YSA9IHtcclxuICAgICAg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nVuZGxlUmVzdWx0LmRlZHVwZWQgPT09IHRydWUgJiYgY29udGVudCAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgIHNhdmVkQnl0ZXMgPSBjb250ZW50Lmxlbmd0aDtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGJ1bmRsZVJlc3VsdC5pbXBvcnRzICE9IG51bGwgJiYgYnVuZGxlUmVzdWx0LmltcG9ydHMubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBmb3IgKGNvbnN0IGltcG9ydFJlc3VsdCBvZiBidW5kbGVSZXN1bHQuaW1wb3J0cykge1xyXG4gICAgICAgICAgICAgICAgc2F2ZWRCeXRlcyArPSB0aGlzLmNvdW50U2F2ZWRCeXRlc0J5RGVkdXBpbmcoaW1wb3J0UmVzdWx0LCBmaWxlUmVnaXN0cnkpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBzYXZlZEJ5dGVzO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZXhpdFdpdGhFcnJvcihtZXNzYWdlOiBzdHJpbmcpIHtcclxuICAgICAgICBpZiAodGhpcy5jb25maWcuVmVyYm9zaXR5ICE9PSBDb250cmFjdHMuVmVyYm9zaXR5Lk5vbmUpIHtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihtZXNzYWdlKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcHJvY2Vzcy5leGl0KDEpO1xyXG4gICAgfVxyXG59XHJcbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF1bmNoZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbGF1bmNoZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRCQUE0QjtBQUM1Qiw2QkFBNkI7QUFDN0IseUJBQXlCO0FBQ3pCLCtCQUErQj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T0x9Q29uY2F0ZW5hdGlvbiByZXN1bHQgaGFzIG5vIGNvbnRlbnQuYCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucmVuZGVyU2NzcyhidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQpO1xyXG4gICAgICAgICAgICB9IGNhdGNoIChzY3NzRXJyb3IpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuZXhpdFdpdGhFcnJvcihgW0Vycm9yXSBUaGVyZSBpcyBhbiBlcnJvciBpbiB5b3VyIHN0eWxlczoke29zLkVPTH0ke3Njc3NFcnJvcn1gKTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gRW5zdXJlIHRoZSBkaXJlY3RvcnkgZXhpc3RzXHJcbiAgICAgICAgICAgIG1rZGlycC5zeW5jKHBhdGguZGlybmFtZSh0aGlzLmNvbmZpZy5EZXN0aW5hdGlvbikpO1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgZnMud3JpdGVGaWxlKHRoaXMuY29uZmlnLkRlc3RpbmF0aW9uLCBidW5kbGVSZXN1bHQuYnVuZGxlZENvbnRlbnQpO1xyXG5cclxuICAgICAgICAgICAgY29uc3QgZnVsbFBhdGggPSBwYXRoLnJlc29sdmUodGhpcy5jb25maWcuRGVzdGluYXRpb24pO1xyXG4gICAgICAgICAgICBpZiAodGhpcy5jb25maWcuVmVyYm9zaXR5ID09PSBDb250cmFjdHMuVmVyYm9zaXR5LlZlcmJvc2UpIHtcclxuICAgICAgICAgICAgICAgIGNvbnNvbGUuaW5mbyhgW0RvbmVdIEJ1bmRsZWQgaW50bzoke29zLkVPTH0ke2Z1bGxQYXRofWApO1xyXG4gICAgICAgICAgICAgICAgY29uc29sZS5pbmZvKGBUb3RhbCBzaXplICAgICAgIDogJHtwc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ICAgIH0pO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgZ2V0QXJjaHlEYXRhKGJ1bmRsZVJlc3VsdDogQnVuZGxlUmVzdWx0LCBzb3VyY2VEaXJlY3Rvcnk/OiBzdHJpbmcpIHtcclxuICAgICAgICBpZiAoc291cmNlRGlyZWN0b3J5ID09IG51bGwpIHtcclxuICAgICAgICAgICAgc291cmNlRGlyZWN0b3J5ID0gcHJvY2Vzcy5jd2QoKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgYXJjaHlEYXRhOiBhcmNoeS5EYXRhID0ge1xyXG4gICAgICAgICAgICBsYWJlbDogcGF0aC5yZWxhdGl2ZShzb3VyY2VEaXJlY3RvcnksIGJ1bmRsZVJlc3VsdC5maWxlUGF0aClcclxuICAgICAgICB9O1xyXG5cclxuICAgICAgICBpZiAoIWJ1bmRsZVJlc3VsdC5mb3VuZCkge1xyXG4gICAgICAgICAgICBhcmNoeURhdGEubGFiZWwgKz0gYCBbTk9UIEZPVU5EXWA7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChidW5kbGVSZXN1bHQuZGVkdXBlZCkge1xyXG4gICAgICAgICAgICBhcmNoeURhdGEubGFiZWwgKz0gYCBbREVEVVBFRF1gO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKGJ1bmRsZVJlc3VsdC5pbXBvcnRzICE9IG51bGwpIHtcclxuICAgICAgICAgICAgYXJjaHlEYXRhLm5vZGVzID0gYnVuZGxlUmVzdWx0LmltcG9ydHMubWFwKHggPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHggIT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldEFyY2h5RGF0YSh4LCBzb3VyY2VEaXJlY3RvcnkpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiXCI7XHJcbiAgICAgICAgIC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ICBjb25zb2xlLmVycm9yKG1lc3NhZ2UpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwcm9jZXNzLmV4aXQoMSk7XHJcbiAgICB9XHJcbn1cclxuIl19 |
{ | ||
"name": "scss-bundle", | ||
"version": "2.0.1-beta.7", | ||
"version": "2.1.0", | ||
"description": "Bundling SCSS files to one bundled file.", | ||
@@ -12,3 +12,4 @@ "types": "@types/index.d.ts", | ||
"watch": "tsc -w", | ||
"test-scss": "node ./dist/bundle-cli.js -e ./example/simple/main.scss -d ./example/output/simple.scss", | ||
"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" | ||
@@ -15,0 +16,0 @@ }, |
@@ -55,2 +55,3 @@ # `scss-bundle` | ||
| verbosity | string choices | Destination file when bundling is done. | None, Errors, Verbose | Verbose | | ||
| includePaths | array | Include paths for resolving imports | ` ` | ` ` | | ||
@@ -57,0 +58,0 @@ `*` - Required |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
73150
517
0
162