Skip to content

Commit 90675a6

Browse files
author
Al Manning
committed
simple project type
1 parent 0efc1ce commit 90675a6

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

src/project/types/project-default.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
2-
* proejct-default.ts
3-
*
4-
* Copyright (C) 2020-2022 Posit Software, PBC
5-
*
6-
*/
2+
* proejct-default.ts
3+
*
4+
* Copyright (C) 2020-2022 Posit Software, PBC
5+
*
6+
*/
77

88
import { join } from "path/mod.ts";
99

@@ -27,21 +27,27 @@ export const defaultProjectType: ProjectType = {
2727
"quarto-contrib",
2828
],
2929

30-
create: (title: string, _template?: string): ProjectCreate => {
31-
// TODO: Conditionalize based upon `template` above
30+
create: (title: string, template?: string): ProjectCreate => {
31+
let resourceDirectory = "default";
32+
if (template === "confluence") {
33+
resourceDirectory = "confluence";
34+
}
35+
36+
const resourceDir = resourcePath(join("projects", resourceDirectory));
3237

33-
const resourceDir = resourcePath(join("projects", "default"));
3438
return {
3539
configTemplate: join(resourceDir, "templates", "_quarto.ejs.yml"),
3640
resourceDir,
3741
scaffold: (engine: string, kernel?: string, packages?: string[]) => {
38-
const file: ProjectScaffoldFile[] = [{
39-
name: title,
40-
content: `## Quarto
42+
const file: ProjectScaffoldFile[] = [
43+
{
44+
name: title,
45+
content: `## Quarto
4146
4247
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.`,
43-
title,
44-
}];
48+
title,
49+
},
50+
];
4551
// add some additional content if we were a jupyter engine document created w/
4652
// matplotlib and/or pandas
4753
if (
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project:
2+
type: confluence
3+
title: "<%= title %>"
4+
5+
<% if(editor){ %>editor: <%= editor %><% } %>

0 commit comments

Comments
 (0)