UNPKG

@truffle/compile-solidity

Version:
33 lines 1.21 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.reportSources = void 0; const path_1 = __importDefault(require("path")); const reportSources = ({ paths, options }) => { if (options.quiet !== true && options.events) { if (!Array.isArray(paths)) { paths = Object.keys(paths); } const blacklistRegex = /^truffle\//; const sources = paths .sort() .map(contract => { if (path_1.default.isAbsolute(contract)) { contract = "." + path_1.default.sep + path_1.default.relative(options.working_directory, contract); } if (contract.match(blacklistRegex) || contract.endsWith(".json")) { return; } return contract; }) .filter(contract => contract); options.events.emit("compile:sourcesToCompile", { sourceFileNames: sources }); } }; exports.reportSources = reportSources; //# sourceMappingURL=reportSources.js.map