UNPKG

@kintone/plugin-packer

Version:

Package your kintone plugin with pure JavaScript

31 lines 934 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.sourceList = void 0; /** * Create content file list from manifest.json */ const sourceList = ( // TODO: Define and use menifest type manifest) => { const sourceTypes = [ ["desktop", "js"], ["desktop", "css"], ["mobile", "js"], ["mobile", "css"], ["config", "js"], ["config", "css"], ]; const list = sourceTypes .map((t) => manifest[t[0]] && manifest[t[0]][t[1]]) .filter((i) => !!i) .reduce((a, b) => a.concat(b), []) .filter((file) => !/^https?:\/\//.test(file)); if (manifest.config && manifest.config.html) { list.push(manifest.config.html); } list.push("manifest.json", manifest.icon); // Make the file list unique return Array.from(new Set(list)); }; exports.sourceList = sourceList; //# sourceMappingURL=sourcelist.js.map