diff --git a/.gulp/Settings.ts b/.gulp/Settings.ts index c5d0096..42e2647 100644 --- a/.gulp/Settings.ts +++ b/.gulp/Settings.ts @@ -65,6 +65,11 @@ export class Settings */ private testWebsitePath = "website"; + /** + * The name of the theme. + */ + private themeName = "mantra"; + /** * Initializes a new instance of the `Settings` class. * @@ -237,4 +242,18 @@ export class Settings { return this.TestPath(this.testWebsitePath, ...path); } + + /** + * Creates a path relative to the test-theme. + * + * @param path + * The path to join. + * + * @returns + * The joined path. + */ + public TestThemePath(...path: string[]) + { + return this.TestWebsitePath("themes", this.themeName, ...path); + } } \ No newline at end of file diff --git a/gulpfile.ts b/gulpfile.ts index 0e40b8c..c984c5b 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -90,19 +90,17 @@ export async function Initialize() "assets" ]; - let themePath = settings.TestWebsitePath("themes", Path.basename(settings.RootPath())); - for (let directory of directories) { await FileSystem.emptyDir(settings.RootPath(directory)); } - if (await FileSystem.pathExists(themePath)) + if (await FileSystem.pathExists(settings.TestThemePath())) { - await FileSystem.remove(themePath); + await FileSystem.remove(settings.TestThemePath()); } - await require("create-symlink")(settings.RootPath(), themePath, { type: "junction" }); + await require("create-symlink")(settings.RootPath(), settings.TestThemePath(), { type: "junction" }); } Initialize.description = "Initializes the project.";