Skip to content

Commit

Permalink
Merge pull request #24 from CloudCannon/static-output-suggestion
Browse files Browse the repository at this point in the history
Add output path suggestion for static sites
  • Loading branch information
rycoll authored Oct 1, 2024
2 parents e5ec0e3 + 50e2864 commit d130e15
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/ssgs/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,22 @@ export default class Static extends Ssg {
}),
};
}

/**
* Generates a list of build suggestions.
*
* @param filePaths {string[]} List of input file paths.
* @param options {{ config?: Record<string, any>; source?: string; readFile?: (path: string) => Promise<string | undefined>; }}
* @returns {Promise<import('../types').BuildCommands>}
*/
async generateBuildCommands(filePaths, options) {
const commands = await super.generateBuildCommands(filePaths, options);

commands.output.unshift({
value: '.',
attribution: 'common for static sites without build',
});

return commands;
}
}

0 comments on commit d130e15

Please sign in to comment.