@@ -26,6 +26,7 @@ interface DetectImportResult {
26
26
interface ExtraSymbols {
27
27
mixins ?: Record < string , string > ;
28
28
functions ?: Record < string , string > ;
29
+ variables ?: Record < string , string > ;
29
30
}
30
31
31
32
/**
@@ -123,19 +124,20 @@ function migrateMaterialSymbols(content: string, importPath: string,
123
124
extraMaterialSymbols : ExtraSymbols = { } ) : string {
124
125
const initialContent = content ;
125
126
const namespace = 'mat' ;
126
- const mixinsToUpdate = { ...materialMixins , ...extraMaterialSymbols . mixins } ;
127
- const functionsToUpdate = { ...materialFunctions , ...extraMaterialSymbols . functions } ;
128
127
129
128
// Migrate the mixins.
129
+ const mixinsToUpdate = { ...materialMixins , ...extraMaterialSymbols . mixins } ;
130
130
content = renameSymbols ( content , mixinsToUpdate , detectedImports . namespaces , mixinKeyFormatter ,
131
131
getMixinValueFormatter ( namespace ) ) ;
132
132
133
133
// Migrate the functions.
134
+ const functionsToUpdate = { ...materialFunctions , ...extraMaterialSymbols . functions } ;
134
135
content = renameSymbols ( content , functionsToUpdate , detectedImports . namespaces ,
135
136
functionKeyFormatter , getFunctionValueFormatter ( namespace ) ) ;
136
137
137
138
// Migrate the variables.
138
- content = renameSymbols ( content , materialVariables , detectedImports . namespaces ,
139
+ const variablesToUpdate = { ...materialVariables , ...extraMaterialSymbols . variables } ;
140
+ content = renameSymbols ( content , variablesToUpdate , detectedImports . namespaces ,
139
141
variableKeyFormatter , getVariableValueFormatter ( namespace ) ) ;
140
142
141
143
if ( content !== initialContent ) {
0 commit comments