-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from CloudCannon/more-build-suggestions
More build suggestions
- Loading branch information
Showing
13 changed files
with
421 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Ssg from './ssg.js'; | ||
|
||
export default class Astro extends Ssg { | ||
constructor() { | ||
super('astro'); | ||
} | ||
|
||
/** | ||
* 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.build.push({ | ||
value: 'npx astro build', | ||
attribution: 'default for Astro sites', | ||
}); | ||
commands.output.push({ | ||
value: 'dist', | ||
attribution: 'default for Astro sites', | ||
}); | ||
|
||
return commands; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Ssg from './ssg.js'; | ||
|
||
export default class Gatsby extends Ssg { | ||
constructor() { | ||
super('gatsby'); | ||
} | ||
|
||
/** | ||
* 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.build.unshift({ | ||
value: 'npx gatsby build', | ||
attribution: 'default for Gatsby sites', | ||
}); | ||
commands.output.unshift({ | ||
value: 'public', | ||
attribution: 'default for Gatsby sites', | ||
}); | ||
|
||
return commands; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Ssg from './ssg.js'; | ||
|
||
export default class Lume extends Ssg { | ||
constructor() { | ||
super('lume'); | ||
} | ||
|
||
/** | ||
* 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.js').BuildCommands>} | ||
*/ | ||
async generateBuildCommands(filePaths, options) { | ||
const commands = await super.generateBuildCommands(filePaths, options); | ||
|
||
commands.build.push({ | ||
value: 'deno task lume', | ||
attribution: 'default for Lume sites', | ||
}); | ||
commands.output.unshift({ | ||
value: '_site', | ||
attribution: 'most common for Lume sites', | ||
}); | ||
|
||
return commands; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Ssg from './ssg.js'; | ||
|
||
export default class MkDocs extends Ssg { | ||
constructor() { | ||
super('mkdocs'); | ||
} | ||
|
||
/** | ||
* 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.build.push({ | ||
value: 'npx mkdocs build', | ||
attribution: 'default for MkDocs sites', | ||
}); | ||
commands.output.unshift({ | ||
value: 'site', | ||
attribution: 'most common for MkDocs sites', | ||
}); | ||
|
||
return commands; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Ssg from './ssg.js'; | ||
|
||
export default class NuxtJs extends Ssg { | ||
constructor() { | ||
super('nuxtjs'); | ||
} | ||
|
||
/** | ||
* 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.build.push({ | ||
value: 'npx nuxt generate', | ||
attribution: 'default for Nuxt sites', | ||
}); | ||
commands.output.unshift({ | ||
value: 'dist', | ||
attribution: 'most common for Nuxt sites', | ||
}); | ||
|
||
return commands; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.