From cb4b9b401c0f206a15279ad96dde1490c122e3ea Mon Sep 17 00:00:00 2001 From: Izzy Smillie Date: Thu, 2 Feb 2023 13:01:06 +0000 Subject: [PATCH 1/2] Add blank html starter project --- lib/tasks/project_components/blank_html_starter/main.html | 0 .../blank_html_starter/project_config.yml | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 lib/tasks/project_components/blank_html_starter/main.html create mode 100644 lib/tasks/project_components/blank_html_starter/project_config.yml diff --git a/lib/tasks/project_components/blank_html_starter/main.html b/lib/tasks/project_components/blank_html_starter/main.html new file mode 100644 index 000000000..e69de29bb diff --git a/lib/tasks/project_components/blank_html_starter/project_config.yml b/lib/tasks/project_components/blank_html_starter/project_config.yml new file mode 100644 index 000000000..a1952e315 --- /dev/null +++ b/lib/tasks/project_components/blank_html_starter/project_config.yml @@ -0,0 +1,8 @@ +NAME: 'Blank HTML Starter' +IDENTIFIER: 'blank-html-starter' +COMPONENTS: + - name: 'main' + extension: 'html' + location: 'main.html' + index: 0 + default: true From c8afe06c0134fbf1692441a2beea953779b34212 Mon Sep 17 00:00:00 2001 From: Izzy Smillie Date: Thu, 2 Feb 2023 14:53:27 +0000 Subject: [PATCH 2/2] Update rake task to accept project type --- .../blank_html_starter/{main.html => index.html} | 0 .../blank_html_starter/project_config.yml | 12 +++++++++--- .../project_components/blank_html_starter/styles.css | 0 lib/tasks/projects.rake | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) rename lib/tasks/project_components/blank_html_starter/{main.html => index.html} (100%) create mode 100644 lib/tasks/project_components/blank_html_starter/styles.css diff --git a/lib/tasks/project_components/blank_html_starter/main.html b/lib/tasks/project_components/blank_html_starter/index.html similarity index 100% rename from lib/tasks/project_components/blank_html_starter/main.html rename to lib/tasks/project_components/blank_html_starter/index.html diff --git a/lib/tasks/project_components/blank_html_starter/project_config.yml b/lib/tasks/project_components/blank_html_starter/project_config.yml index a1952e315..9cb93f804 100644 --- a/lib/tasks/project_components/blank_html_starter/project_config.yml +++ b/lib/tasks/project_components/blank_html_starter/project_config.yml @@ -1,8 +1,14 @@ -NAME: 'Blank HTML Starter' +NAME: 'Blank HTML & CSS Starter' IDENTIFIER: 'blank-html-starter' +TYPE: 'html' COMPONENTS: - - name: 'main' + - name: 'index' extension: 'html' - location: 'main.html' + location: 'index.html' index: 0 default: true + - name: 'styles' + extension: 'css' + location: styles.css + index: 1 + default: false diff --git a/lib/tasks/project_components/blank_html_starter/styles.css b/lib/tasks/project_components/blank_html_starter/styles.css new file mode 100644 index 000000000..e69de29bb diff --git a/lib/tasks/projects.rake b/lib/tasks/projects.rake index 93ae0fce1..23307857b 100644 --- a/lib/tasks/projects.rake +++ b/lib/tasks/projects.rake @@ -32,7 +32,8 @@ end def find_project(proj_config) if Project.find_by(identifier: proj_config['IDENTIFIER']).nil? - project = Project.new(identifier: proj_config['IDENTIFIER'], name: proj_config['NAME']) + project = Project.new(identifier: proj_config['IDENTIFIER'], name: proj_config['NAME'], + project_type: proj_config['TYPE'] ||= 'python') else project = Project.find_by(identifier: proj_config['IDENTIFIER']) project.name = proj_config['NAME']