Skip to content

Migration Checklist 4.x to 5.x

Alexander Benz edited this page Jan 10, 2018 · 44 revisions

System

Configuration

Folders

  • /app nach /src umbenennen
  • /layout in /layouts umbenennen, /includes nach /layouts kopieren
  • create /src/pages and move all pages (except index.html) there
  • move /components, /layouts, /scaffolding to /src
  • move /src/

Files

Template Engine

Search & Replace

Order of execution is critical!!!!!

  1. Search & Replace Zetzer includes to HBS partials (WITH variables)
REPLACE: \{\{= *ftf\.include\( *"(\.\/)?(.*)\.html"([ ,]*(\{.*\}))? *\) *\}\}
INTO: {{include '$2' frontendFrameworkMigration='$4'}}

This might be better if there are includes with single quotes (needs verification):

REPLACE: \{\{= *ftf\.include\( *['"](\.\/)?(.*)\.html['"]([ ,]*(\{.*\}))? *\) *\}\}
  1. Remove include helpers with empty variables
REPLACE: \{\{(.*)frontendFrameworkMigration=\'\'\}\}
INTO: {{$1}}

Combined alternative for 1. and 2. for frameworks with includes without variables

  • Search & Replace Zetzer includes to HBS partials (WITHOUT variables ONLY!!!)
REPLACE: \{\{= *ftf\.include\( *"(\.\/)?(.*)\.html" *\) *\}\}
INTO: {{include '$2'}}

  1. Search & Replace changed paths from {{include '...
  • "frameworks/" -> "components/framework/"
  • "includes/" -> "layouts/includes/"
  • "../_mock/" -> "_mock/"

This can be done with plain Search&Replace function, no RegEx needed.



!!!! WATCH OUT FROM HERE !!!! There might be lots of special elements. You can't blindly replace everything from now on...


  1. Search & Replace Zetzer to HBS expressions with default values
REPLACE: \{\{= *ftf\. *(.*?) *\|\| *[\'\"](.*?)[\'\"] *\}\}
INTO: {{def $1 '$2'}}

! careful with multiple occurences in one line


  1. Search & Replace Zetzer to HBS expressions without default values
REPLACE: \{\{ *\= *ftf\.(.*?\S) *\}\}
INTO: {{ $1 }}

Handcraft

NEEDS TO BE TESTED
REPLACE: \{\{# *?partial\.(.*?)( *?| \|\| '' *?)\}\}
INTO: {{ $1 }}
  • Rewrite dynamic includes like {{= ftf.include(partial.contentMain) }} to lookup partial {{> (lookup . 'contentMain') }}
  • search for "{{?" and rewite to handleabrs {{#if ...}} {{else}} {{/if}}

Scripts

SASS

Clone this wiki locally