MCPcopy
hub / github.com/sveltejs/svelte / adjust

Function adjust

packages/svelte/src/compiler/state.js:160–175  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

158 * }} state
159 */
160export function adjust(state) {
161 const root_dir = state.rootDir?.replace(/\\/g, '/');
162
163 dev = state.dev;
164 runes = state.runes;
165 component_name = state.component_name ?? UNKNOWN_FILENAME;
166
167 if (typeof root_dir === 'string' && filename.startsWith(root_dir)) {
168 // make filename relative to rootDir
169 filename = filename.replace(root_dir, '').replace(/^[/\\]/, '');
170 }
171
172 ignore_stack = [];
173 ignore_map.clear();
174 cached_ignore_snapshot = null;
175}

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected