Skip to content
Snippets Groups Projects
Commit 0b300b6c authored by Benni Mack's avatar Benni Mack Committed by Benjamin Kott
Browse files

[FEATURE] Introduce new @import syntax for TS includes

The original '<INCLUDE_TYPOSCRIPT...>' syntax is hard to understand,
error-prone and overloaded with features.

This patch introduces a new way to include files based on SymfonyFinder
and simple logic to allow to include files or folders:

The following syntax (leaned towards SASS imports) is added:
Imports one file:

- @import 'EXT:myext/Configuration/TypoScript/myfile.typoscript'

Imports all files in a folder (always sorted by name):
- @import 'EXT:myext/Configuration/TypoScript/*'
- @import 'EXT:myext/Configuration/TypoScript/'

Imports all files ending with ".typoscript":
- @import 'EXT:myext/Configuration/TypoScript/*.typoscript'

Automatically adds '.typoscript' file ending and includes setup.typoscript
- @import 'EXT:myext/Configuration/TypoScript/setup'

This is all done with Symfony Finder to find the files.

Resolves: #82812
Releases: master
Change-Id: I4b64a087ef8c6aa85063c19c1882c9ed3448d9b5
Reviewed-on: https://review.typo3.org/54446


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Tested-by: default avatarMarkus Sommer <markus.sommer@typo3.org>
Reviewed-by: default avatarMarkus Sommer <markus.sommer@typo3.org>
Reviewed-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
Tested-by: default avatarBenjamin Kott <benjamin.kott@outlook.com>
parent 6a56da73
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment