function getDirectories(assets) {
	const directories = new Set();
	/**
	 * @param {string} filename asset filename
	 */
	const addDirectory = filename => {
		directories.add(path.dirname(filename));
	};

	// get directories of assets
	for (const [asset] of assets) {
		addDirectory(asset);
	}
	// and all parent directories
	for (const directory of directories) {
		addDirectory(directory);
	}
	return directories;
}
@param {Map<string, number>} assets current assets
@returns {Set<string>} Set of directory paths