UNPKG

atlassian-webresource-webpack-plugin

Version:

Auto-generates web-resource definitions from your webpacked code, for usage in an Atlassian product or plugin.

23 lines 880 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.writeFileSync = void 0; const fs_1 = __importDefault(require("fs")); const path_1 = __importDefault(require("path")); function writeFileSync(outputPath, contents) { try { // will throw a TypeError if the path is non-normal path_1.default.parse(outputPath); fs_1.default.mkdirSync(path_1.default.dirname(outputPath), { recursive: true }); fs_1.default.writeFileSync(outputPath, contents, 'utf8'); return true; } catch (e) { console.error(`Failed to output file at path ${outputPath}`, e); return false; } } exports.writeFileSync = writeFileSync; //# sourceMappingURL=file-system.js.map