-
Notifications
You must be signed in to change notification settings - Fork 0
Variables Path
Path variables create file-level dependencies by referencing other files in the project.
<< "FROM" >>
Given two files:
file.js:
import Class from '../otherfile.js';otherfile.js:
function Class () {
...
}<:import:> import <<name>> from <<"FROM".js>> <:>
The <<"FROM".js>> variable captures the file path and creates a dependency between file.js and otherfile.js. The string symbols (", ', `) do not need to be referred to in the Crodox definition — string objects get combined to an §§§ input element within the input parser.
The file extension specified in the variable determines how the path is captured:
<<"From".endung>>: a/b/c.endung
=> "From" = a/b/c
<<"From">>: a/b/c.endung
=> "From" = a/b/c.endung
When the extension is part of the variable declaration (e.g., <<"From".endung>>), it is separated from the captured path. When no extension is specified, the full path including the extension is captured.
File variables should share the same name as the file grammar definition to establish a connection:
<~"FROM".ts~> <<"FROM".ts>>
The file definition <~"FROM".ts~> and the path variable <<"FROM".ts>> both use "FROM" — this is how Crodox links a file reference to the correct subgrammar.
See also: Reference Variables · Uppercase Variables · All Variables
- Getting Started
- Sign-Up
- Home Screen
- Creating Your First Template
- Template Editor
- Application Navigation
- Syntax Overview
- Workflow: End-to-End
- Workflow: Test with simpleDemo
- Workflow: Build Template from angularTemp
- Demo Repositories
- Template
- Workbench
- GitHub Integration
- GitHub App Installation
- GitHub Repository Setup
- GitHub Re-linking
- Settings
- Overview
- Declarations
- Types
- Scoping