diff --git a/shard.yml b/shard.yml index 5015d652..dda5846d 100644 --- a/shard.yml +++ b/shard.yml @@ -13,12 +13,9 @@ crystal: ">= 1.6.0" license: MIT dependencies: - teeplate: - github: luckyframework/teeplate - version: ~> 0.8.5 lucky_template: github: luckyframework/lucky_template - version: ~> 0.1.0 + version: ~> 0.2.0 lucky_task: github: luckyframework/lucky_task version: ~> 0.1.1 diff --git a/src/browser_app_skeleton/bs-config.js b/src/browser_app_skeleton/bs-config.js.ecr similarity index 100% rename from src/browser_app_skeleton/bs-config.js rename to src/browser_app_skeleton/bs-config.js.ecr diff --git a/src/browser_app_skeleton/config/html_page.cr b/src/browser_app_skeleton/config/html_page.cr.ecr similarity index 100% rename from src/browser_app_skeleton/config/html_page.cr rename to src/browser_app_skeleton/config/html_page.cr.ecr diff --git a/src/browser_app_skeleton/package.json b/src/browser_app_skeleton/package.json.ecr similarity index 100% rename from src/browser_app_skeleton/package.json rename to src/browser_app_skeleton/package.json.ecr diff --git a/src/browser_app_skeleton/public/favicon.ico b/src/browser_app_skeleton/public/favicon.ico.ecr similarity index 100% rename from src/browser_app_skeleton/public/favicon.ico rename to src/browser_app_skeleton/public/favicon.ico.ecr diff --git a/src/browser_app_skeleton/public/mix-manifest.json b/src/browser_app_skeleton/public/mix-manifest.json.ecr similarity index 100% rename from src/browser_app_skeleton/public/mix-manifest.json rename to src/browser_app_skeleton/public/mix-manifest.json.ecr diff --git a/src/browser_app_skeleton/public/robots.txt b/src/browser_app_skeleton/public/robots.txt.ecr similarity index 100% rename from src/browser_app_skeleton/public/robots.txt rename to src/browser_app_skeleton/public/robots.txt.ecr diff --git a/src/browser_app_skeleton/spec/setup/configure_lucky_flow.cr b/src/browser_app_skeleton/spec/setup/configure_lucky_flow.cr.ecr similarity index 100% rename from src/browser_app_skeleton/spec/setup/configure_lucky_flow.cr rename to src/browser_app_skeleton/spec/setup/configure_lucky_flow.cr.ecr diff --git a/src/browser_app_skeleton/spec/support/flows/base_flow.cr b/src/browser_app_skeleton/spec/support/flows/base_flow.cr.ecr similarity index 100% rename from src/browser_app_skeleton/spec/support/flows/base_flow.cr rename to src/browser_app_skeleton/spec/support/flows/base_flow.cr.ecr diff --git a/src/browser_app_skeleton/src/components/base_component.cr b/src/browser_app_skeleton/src/components/base_component.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/components/base_component.cr rename to src/browser_app_skeleton/src/components/base_component.cr.ecr diff --git a/src/browser_app_skeleton/src/components/shared/field.cr b/src/browser_app_skeleton/src/components/shared/field.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/components/shared/field.cr rename to src/browser_app_skeleton/src/components/shared/field.cr.ecr diff --git a/src/browser_app_skeleton/src/components/shared/field_errors.cr b/src/browser_app_skeleton/src/components/shared/field_errors.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/components/shared/field_errors.cr rename to src/browser_app_skeleton/src/components/shared/field_errors.cr.ecr diff --git a/src/browser_app_skeleton/src/components/shared/flash_messages.cr b/src/browser_app_skeleton/src/components/shared/flash_messages.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/components/shared/flash_messages.cr rename to src/browser_app_skeleton/src/components/shared/flash_messages.cr.ecr diff --git a/src/browser_app_skeleton/src/components/shared/layout_head.cr b/src/browser_app_skeleton/src/components/shared/layout_head.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/components/shared/layout_head.cr rename to src/browser_app_skeleton/src/components/shared/layout_head.cr.ecr diff --git a/src/browser_app_skeleton/src/css/app.scss b/src/browser_app_skeleton/src/css/app.scss.ecr similarity index 100% rename from src/browser_app_skeleton/src/css/app.scss rename to src/browser_app_skeleton/src/css/app.scss.ecr diff --git a/src/browser_app_skeleton/src/js/app.js b/src/browser_app_skeleton/src/js/app.js.ecr similarity index 100% rename from src/browser_app_skeleton/src/js/app.js rename to src/browser_app_skeleton/src/js/app.js.ecr diff --git a/src/browser_app_skeleton/src/pages/errors/show_page.cr b/src/browser_app_skeleton/src/pages/errors/show_page.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/pages/errors/show_page.cr rename to src/browser_app_skeleton/src/pages/errors/show_page.cr.ecr diff --git a/src/browser_app_skeleton/src/pages/main_layout.cr b/src/browser_app_skeleton/src/pages/main_layout.cr.ecr similarity index 100% rename from src/browser_app_skeleton/src/pages/main_layout.cr rename to src/browser_app_skeleton/src/pages/main_layout.cr.ecr diff --git a/src/browser_app_skeleton/webpack.mix.js b/src/browser_app_skeleton/webpack.mix.js.ecr similarity index 100% rename from src/browser_app_skeleton/webpack.mix.js rename to src/browser_app_skeleton/webpack.mix.js.ecr diff --git a/src/generators/web.cr b/src/generators/web.cr index 47345b18..8e5432fe 100644 --- a/src/generators/web.cr +++ b/src/generators/web.cr @@ -115,7 +115,6 @@ class LuckyCli::Generators::Web end end - # TODO: migrate to lucky_template private def add_default_lucky_structure_to_src SrcTemplate.new( project_name, @@ -123,13 +122,12 @@ class LuckyCli::Generators::Web api_only: api_only?, with_sec_tester: with_sec_tester? ) - .render(project_dir, force: true) + .render(Path[project_dir]) end - # TODO: migrate to lucky_template private def add_browser_app_structure_to_src BrowserSrcTemplate.new(generate_auth: generate_auth?) - .render(project_dir, force: true) + .render(Path[project_dir]) end private def add_base_auth_to_src diff --git a/src/lucky_cli.cr b/src/lucky_cli.cr index 6852fb54..97f114bc 100644 --- a/src/lucky_cli.cr +++ b/src/lucky_cli.cr @@ -1,4 +1,3 @@ -require "teeplate" require "lucky_template" require "lucky_task" require "nox" diff --git a/src/lucky_cli/browser_src_template.cr b/src/lucky_cli/browser_src_template.cr index e1d58e87..d7156b85 100644 --- a/src/lucky_cli/browser_src_template.cr +++ b/src/lucky_cli/browser_src_template.cr @@ -1,9 +1,122 @@ require "random/secure" -class BrowserSrcTemplate < Teeplate::FileTree - directory "#{__DIR__}/../browser_app_skeleton" +class BrowserSrcTemplate getter? generate_auth def initialize(@generate_auth : Bool) end + + def render(path : Path) + LuckyTemplate.write!(path, template_folder) + end + + def template_folder + LuckyTemplate.create_folder do |root_dir| + root_dir.add_file("bs-config.js") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/bs-config.js.ecr", io) + end + root_dir.add_file("package.json") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/package.json.ecr", io) + end + root_dir.add_file("webpack.mix.js") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/webpack.mix.js.ecr", io) + end + root_dir.add_folder("config") do |config_dir| + config_dir.add_file("html_page.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/config/html_page.cr.ecr", io) + end + end + root_dir.add_folder("db") do |db_dir| + db_dir.add_file("migrations/.keep") + end + root_dir.add_folder("public") do |public_dir| + public_dir.add_file("favicon.ico") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/public/favicon.ico.ecr", io) + end + public_dir.add_file("mix-manifest.json") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/public/mix-manifest.json.ecr", io) + end + public_dir.add_file("robots.txt") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/public/robots.txt.ecr", io) + end + public_dir.add_file("assets/images/.keep") + end + root_dir.insert_folder("spec", spec_folder) + root_dir.insert_folder("src", src_folder) + end + end + + private def spec_folder + LuckyTemplate.create_folder do |spec_dir| + spec_dir.add_file("flows/.keep") + spec_dir.add_folder("setup") do |setup_dir| + setup_dir.add_file(".keep") + setup_dir.add_file("configure_lucky_flow.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/spec/setup/configure_lucky_flow.cr.ecr", io) + end + end + spec_dir.add_folder("support") do |support_dir| + support_dir.add_file(".keep") + support_dir.add_file("factories/.keep") + support_dir.add_file("flows/base_flow.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/spec/support/flows/base_flow.cr.ecr", io) + end + end + end + end + + private def src_folder + LuckyTemplate.create_folder do |src_dir| + src_dir.add_file("actions/browser_action.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/actions/browser_action.cr.ecr", io) + end + src_dir.add_folder("components") do |components_dir| + components_dir.add_file(".keep") + components_dir.add_file("base_component.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/components/base_component.cr.ecr", io) + end + components_dir.add_folder("shared") do |shared_dir| + shared_dir.add_file("field.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/components/shared/field.cr.ecr", io) + end + shared_dir.add_file("field_errors.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/components/shared/field_errors.cr.ecr", io) + end + shared_dir.add_file("flash_messages.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/components/shared/flash_messages.cr.ecr", io) + end + shared_dir.add_file("layout_head.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/components/shared/layout_head.cr.ecr", io) + end + end + end + src_dir.add_folder("css") do |css_dir| + css_dir.add_file("app.scss") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/css/app.scss.ecr", io) + end + css_dir.add_folder("components/.keep") + css_dir.add_folder("mixins/.keep") + css_dir.add_folder("variables/.keep") + end + src_dir.add_file("emails/.keep") + src_dir.add_file("js/app.js") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/js/app.js.ecr", io) + end + src_dir.add_folder("models") do |models_dir| + models_dir.add_file("mixins/.keep") + end + src_dir.add_folder("operations") do |ops_dir| + ops_dir.add_file(".keep") + ops_dir.add_file("mixins/.keep") + end + src_dir.add_folder("pages") do |pages_dir| + pages_dir.add_file("main_layout.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/pages/main_layout.cr.ecr", io) + end + pages_dir.add_file("errors/show_page.cr") do |io| + ECR.embed("#{__DIR__}/../browser_app_skeleton/src/pages/errors/show_page.cr.ecr", io) + end + end + end + end end diff --git a/src/lucky_cli/shard_file_generator.cr b/src/lucky_cli/shard_file_generator.cr index bb2d07e0..42896104 100644 --- a/src/lucky_cli/shard_file_generator.cr +++ b/src/lucky_cli/shard_file_generator.cr @@ -21,16 +21,12 @@ class ShardFileGenerator def template_folder LuckyTemplate.create_folder do |top_dir| - top_dir.add_file("shard.yml", <<-YAML) - #{shard_info} - #{shard_deps} - #{shard_dev_deps} - YAML + top_dir.add_file("shard.yml", shard_yml.to_yaml) end end - def shard_info : String - normalize_yaml({ + def shard_yml + { "name" => project_name, "version" => "0.1.0", "targets" => { @@ -38,19 +34,21 @@ class ShardFileGenerator "main" => Path.new("src", "#{project_name}.cr").to_s, }, }, - "crystal" => ">= #{Crystal::VERSION}", - }) + "crystal" => ">= #{Crystal::VERSION}", + "dependencies" => shard_deps, + "development_dependencies" => shard_dev_deps, + } end - def shard_deps + private def shard_deps deps = project_base_deps if generate_auth? deps = deps.merge(project_auth_deps) end - normalize_yaml({"dependencies" => deps}) + deps end - def shard_dev_deps + private def shard_dev_deps deps = {} of String => String if browser? deps = deps.merge(project_browser_dev_deps) @@ -58,11 +56,7 @@ class ShardFileGenerator if with_sec_tester? deps = deps.merge(project_additional_dev_deps) end - normalize_yaml({"development_dependencies" => deps}) - end - - private def normalize_yaml(hash) : String - hash.to_yaml.lines[1..].join('\n') + deps end private def project_base_deps diff --git a/src/lucky_cli/src_template.cr b/src/lucky_cli/src_template.cr index 7ae56cc4..262a8713 100644 --- a/src/lucky_cli/src_template.cr +++ b/src/lucky_cli/src_template.cr @@ -1,7 +1,6 @@ require "random/secure" -class SrcTemplate < Teeplate::FileTree - directory "#{__DIR__}/../web_app_skeleton" +class SrcTemplate getter project_name getter? api_only, generate_auth, with_sec_tester getter crystal_project_name : String @@ -21,4 +20,219 @@ class SrcTemplate < Teeplate::FileTree def secret_key_base Random::Secure.base64(32) end + + def render(path : Path) + LuckyTemplate.write!(path, template_folder) + end + + def template_folder + LuckyTemplate.create_folder do |root_dir| + root_dir.add_file(".crystal-version") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/.crystal-version.ecr", io) + end + root_dir.add_file(".env") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/.env.ecr", io) + end + root_dir.add_file("docker-compose.yml") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/docker-compose.yml.ecr", io) + end + root_dir.add_file("Procfile") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/Procfile.ecr", io) + end + root_dir.add_file("Procfile.dev") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/Procfile.dev.ecr", io) + end + root_dir.add_file("README.md") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/README.md.ecr", io) + end + root_dir.add_file("tasks.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/tasks.cr.ecr", io) + end + root_dir.add_folder(".github") do |dot_gh_dir| + dot_gh_dir.add_folder("workflows") do |workflows_dir| + workflows_dir.add_file("ci.yml") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/.github/workflows/ci.yml.ecr", io) + end + end + end + root_dir.add_folder("config") do |config_dir| + config_dir.add_file("application.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/application.cr.ecr", io) + end + config_dir.add_file("colors.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/colors.cr.ecr", io) + end + config_dir.add_file("cookies.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/cookies.cr.ecr", io) + end + config_dir.add_file("database.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/database.cr.ecr", io) + end + config_dir.add_file("email.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/email.cr.ecr", io) + end + config_dir.add_file("env.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/env.cr.ecr", io) + end + config_dir.add_file("error_handler.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/error_handler.cr.ecr", io) + end + config_dir.add_file("log.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/log.cr.ecr", io) + end + config_dir.add_file("route_helper.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/route_helper.cr.ecr", io) + end + config_dir.add_file("server.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/server.cr.ecr", io) + end + config_dir.add_file("watch.yml") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/config/watch.yml.ecr", io) + end + end + root_dir.add_folder("db") do |db_dir| + db_dir.add_file("migrations/.keep") + end + root_dir.add_folder("docker") do |docker_dir| + docker_dir.add_file("dev_entrypoint.sh", 0o755) do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/docker/dev_entrypoint.sh.ecr", io) + end + docker_dir.add_file("development.dockerfile") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/docker/development.dockerfile.ecr", io) + end + docker_dir.add_file("wait-for-it.sh", 0o755) do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/docker/wait-for-it.sh.ecr", io) + end + end + root_dir.add_folder("script") do |script_dir| + script_dir.add_file("setup", 0o755) do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/script/setup.ecr", io) + end + script_dir.add_file("system_check", 0o755) do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/script/system_check.ecr", io) + end + script_dir.add_folder("helpers") do |helpers_dir| + helpers_dir.add_file("function_helpers") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/script/helpers/function_helpers.ecr", io) + end + helpers_dir.add_file("text_helpers") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/script/helpers/text_helpers.ecr", io) + end + end + end + root_dir.insert_folder("spec", spec_folder) + root_dir.insert_folder("src", src_folder) + root_dir.insert_folder("tasks", tasks_folder) + end + end + + private def spec_folder + LuckyTemplate.create_folder do |spec_dir| + spec_dir.add_file("spec_helper.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/spec/spec_helper.cr.ecr", io) + end + spec_dir.add_folder("setup") do |setup_dir| + setup_dir.add_file("clean_database.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/spec/setup/clean_database.cr.ecr", io) + end + setup_dir.add_file("reset_emails.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/spec/setup/reset_emails.cr.ecr", io) + end + setup_dir.add_file("setup_database.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/spec/setup/setup_database.cr.ecr", io) + end + setup_dir.add_file("start_app_server.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/spec/setup/start_app_server.cr.ecr", io) + end + end + spec_dir.add_folder("support") do |support_dir| + support_dir.add_file(".keep") + support_dir.add_file("api_client.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/spec/support/api_client.cr.ecr", io) + end + support_dir.add_file("factories/.keep") + end + end + end + + private def src_folder + LuckyTemplate.create_folder do |src_dir| + src_dir.add_file("app.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/app.cr.ecr", io) + end + src_dir.add_file("app_database.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/app_database.cr.ecr", io) + end + src_dir.add_file("app_server.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/app_server.cr.ecr", io) + end + src_dir.add_file("shards.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/shards.cr.ecr", io) + end + src_dir.add_file("start_server.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/start_server.cr.ecr", io) + end + src_dir.add_file("#{crystal_project_name}.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/project_name.cr.ecr", io) + end + src_dir.add_folder("actions") do |actions_dir| + actions_dir.add_file("api_action.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/actions/api_action.cr.ecr", io) + end + actions_dir.add_folder("errors") do |errors_dir| + errors_dir.add_file("show.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/actions/errors/show.cr.ecr", io) + end + end + actions_dir.add_folder("home") do |home_dir| + home_dir.add_file("index.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/actions/home/index.cr.ecr", io) + end + end + actions_dir.add_file("mixins/.keep") + end + src_dir.add_folder("emails") do |emails_dir| + emails_dir.add_file("base_email.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/emails/base_email.cr.ecr", io) + end + end + src_dir.add_folder("models") do |models_dir| + models_dir.add_file("base_model.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/models/base_model.cr.ecr", io) + end + models_dir.add_file("mixins/.keep") + end + src_dir.add_folder("operations") do |ops_dir| + ops_dir.add_file(".keep") + ops_dir.add_file("mixins/.keep") + end + src_dir.add_folder("queries") do |queries_dir| + queries_dir.add_file(".keep") + queries_dir.add_file("mixins/.keep") + end + src_dir.add_folder("serializers") do |serializers_dir| + serializers_dir.add_file(".keep") + serializers_dir.add_file("base_serializer.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/serializers/base_serializer.cr.ecr", io) + end + serializers_dir.add_file("error_serializer.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/src/serializers/error_serializer.cr.ecr", io) + end + end + end + end + + private def tasks_folder + LuckyTemplate.create_folder do |tasks_dir| + tasks_dir.add_file(".keep") + tasks_dir.add_folder("db/seed") do |seed_dir| + seed_dir.add_file("required_data.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/tasks/db/seed/required_data.cr.ecr", io) + end + seed_dir.add_file("sample_data.cr") do |io| + ECR.embed("#{__DIR__}/../web_app_skeleton/tasks/db/seed/sample_data.cr.ecr", io) + end + end + end + end end diff --git a/src/web_app_skeleton/.env b/src/web_app_skeleton/.env.ecr similarity index 100% rename from src/web_app_skeleton/.env rename to src/web_app_skeleton/.env.ecr diff --git a/src/web_app_skeleton/Procfile b/src/web_app_skeleton/Procfile.ecr similarity index 100% rename from src/web_app_skeleton/Procfile rename to src/web_app_skeleton/Procfile.ecr diff --git a/src/web_app_skeleton/config/application.cr b/src/web_app_skeleton/config/application.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/application.cr rename to src/web_app_skeleton/config/application.cr.ecr diff --git a/src/web_app_skeleton/config/colors.cr b/src/web_app_skeleton/config/colors.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/colors.cr rename to src/web_app_skeleton/config/colors.cr.ecr diff --git a/src/web_app_skeleton/config/email.cr b/src/web_app_skeleton/config/email.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/email.cr rename to src/web_app_skeleton/config/email.cr.ecr diff --git a/src/web_app_skeleton/config/env.cr b/src/web_app_skeleton/config/env.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/env.cr rename to src/web_app_skeleton/config/env.cr.ecr diff --git a/src/web_app_skeleton/config/error_handler.cr b/src/web_app_skeleton/config/error_handler.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/error_handler.cr rename to src/web_app_skeleton/config/error_handler.cr.ecr diff --git a/src/web_app_skeleton/config/log.cr b/src/web_app_skeleton/config/log.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/log.cr rename to src/web_app_skeleton/config/log.cr.ecr diff --git a/src/web_app_skeleton/config/route_helper.cr b/src/web_app_skeleton/config/route_helper.cr.ecr similarity index 100% rename from src/web_app_skeleton/config/route_helper.cr rename to src/web_app_skeleton/config/route_helper.cr.ecr diff --git a/src/web_app_skeleton/config/watch.yml b/src/web_app_skeleton/config/watch.yml.ecr similarity index 100% rename from src/web_app_skeleton/config/watch.yml rename to src/web_app_skeleton/config/watch.yml.ecr diff --git a/src/web_app_skeleton/docker-compose.yml b/src/web_app_skeleton/docker-compose.yml.ecr similarity index 100% rename from src/web_app_skeleton/docker-compose.yml rename to src/web_app_skeleton/docker-compose.yml.ecr diff --git a/src/web_app_skeleton/docker/wait-for-it.sh b/src/web_app_skeleton/docker/wait-for-it.sh.ecr similarity index 100% rename from src/web_app_skeleton/docker/wait-for-it.sh rename to src/web_app_skeleton/docker/wait-for-it.sh.ecr diff --git a/src/web_app_skeleton/script/helpers/function_helpers b/src/web_app_skeleton/script/helpers/function_helpers.ecr similarity index 100% rename from src/web_app_skeleton/script/helpers/function_helpers rename to src/web_app_skeleton/script/helpers/function_helpers.ecr diff --git a/src/web_app_skeleton/script/helpers/text_helpers b/src/web_app_skeleton/script/helpers/text_helpers.ecr similarity index 100% rename from src/web_app_skeleton/script/helpers/text_helpers rename to src/web_app_skeleton/script/helpers/text_helpers.ecr diff --git a/src/web_app_skeleton/spec/setup/clean_database.cr b/src/web_app_skeleton/spec/setup/clean_database.cr.ecr similarity index 100% rename from src/web_app_skeleton/spec/setup/clean_database.cr rename to src/web_app_skeleton/spec/setup/clean_database.cr.ecr diff --git a/src/web_app_skeleton/spec/setup/reset_emails.cr b/src/web_app_skeleton/spec/setup/reset_emails.cr.ecr similarity index 100% rename from src/web_app_skeleton/spec/setup/reset_emails.cr rename to src/web_app_skeleton/spec/setup/reset_emails.cr.ecr diff --git a/src/web_app_skeleton/spec/setup/setup_database.cr b/src/web_app_skeleton/spec/setup/setup_database.cr.ecr similarity index 100% rename from src/web_app_skeleton/spec/setup/setup_database.cr rename to src/web_app_skeleton/spec/setup/setup_database.cr.ecr diff --git a/src/web_app_skeleton/src/app_database.cr b/src/web_app_skeleton/src/app_database.cr.ecr similarity index 100% rename from src/web_app_skeleton/src/app_database.cr rename to src/web_app_skeleton/src/app_database.cr.ecr diff --git a/src/web_app_skeleton/src/emails/base_email.cr b/src/web_app_skeleton/src/emails/base_email.cr.ecr similarity index 100% rename from src/web_app_skeleton/src/emails/base_email.cr rename to src/web_app_skeleton/src/emails/base_email.cr.ecr diff --git a/src/web_app_skeleton/src/models/base_model.cr b/src/web_app_skeleton/src/models/base_model.cr.ecr similarity index 100% rename from src/web_app_skeleton/src/models/base_model.cr rename to src/web_app_skeleton/src/models/base_model.cr.ecr diff --git a/src/web_app_skeleton/src/{{crystal_project_name}}.cr b/src/web_app_skeleton/src/project_name.cr.ecr similarity index 100% rename from src/web_app_skeleton/src/{{crystal_project_name}}.cr rename to src/web_app_skeleton/src/project_name.cr.ecr diff --git a/src/web_app_skeleton/src/serializers/base_serializer.cr b/src/web_app_skeleton/src/serializers/base_serializer.cr.ecr similarity index 100% rename from src/web_app_skeleton/src/serializers/base_serializer.cr rename to src/web_app_skeleton/src/serializers/base_serializer.cr.ecr diff --git a/src/web_app_skeleton/src/serializers/error_serializer.cr b/src/web_app_skeleton/src/serializers/error_serializer.cr.ecr similarity index 100% rename from src/web_app_skeleton/src/serializers/error_serializer.cr rename to src/web_app_skeleton/src/serializers/error_serializer.cr.ecr diff --git a/src/web_app_skeleton/tasks.cr b/src/web_app_skeleton/tasks.cr.ecr similarity index 100% rename from src/web_app_skeleton/tasks.cr rename to src/web_app_skeleton/tasks.cr.ecr diff --git a/src/web_app_skeleton/tasks/db/seed/required_data.cr b/src/web_app_skeleton/tasks/db/seed/required_data.cr.ecr similarity index 100% rename from src/web_app_skeleton/tasks/db/seed/required_data.cr rename to src/web_app_skeleton/tasks/db/seed/required_data.cr.ecr diff --git a/src/web_app_skeleton/tasks/db/seed/sample_data.cr b/src/web_app_skeleton/tasks/db/seed/sample_data.cr.ecr similarity index 100% rename from src/web_app_skeleton/tasks/db/seed/sample_data.cr rename to src/web_app_skeleton/tasks/db/seed/sample_data.cr.ecr