Skip to content

Commit bccfdb0

Browse files
committed
fix: call compileAlloyComponent
1 parent bc614c9 commit bccfdb0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Alloy/commands/compile/tasks/mvc-compile-task.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ class MvcCompileTask extends IncrementalFileTask {
9090
if (fileState === 'deleted') {
9191
// @todo delete associated controller, view and styles
9292
} else {
93-
const collection = this.findSourceCollection(inputFile);
94-
const parseAsCotroller = controllerRegex.test(inputFile);
95-
parseAlloyComponent(view, collection.dir, collection.manifest, parseAsCotroller, restrictionPath);
93+
this.compileAlloyComponent(filePath);
9694
}
9795
});
9896

@@ -123,7 +121,7 @@ class MvcCompileTask extends IncrementalFileTask {
123121
*/
124122
compileAlloyComponent(inputFile) {
125123
const collection = this.findSourceCollection(inputFile);
126-
const parseAsCotroller = controllerRegex.test(inputFile);
124+
const parseAsController = controllerRegex.test(inputFile);
127125
let relativeComponentPath = inputFile.replace(collection.dir, '');
128126
relativeComponentPath = relativeComponentPath.replace(new RegExp(`^${path.sep}?(views|controllers)${path.sep}?`), '');
129127

@@ -135,8 +133,8 @@ class MvcCompileTask extends IncrementalFileTask {
135133
}
136134

137135
this.logger.info('[' + relativeComponentPath + '] ' + (collection.manifest ? collection.manifest.id +
138-
' ' : '') + `${parseAsCotroller ? 'controller' : 'view'} processing...`);
139-
this.parseAlloyComponent(relativeComponentPath, collection.dir, collection.manifest, parseAsCotroller, this.restrictionPath);
136+
' ' : '') + `${parseAsController ? 'controller' : 'view'} processing...`);
137+
this.parseAlloyComponent(relativeComponentPath, collection.dir, collection.manifest, parseAsController, this.restrictionPath);
140138
this.processed[fullComponentIdentifier] = true;
141139
}
142140
}

0 commit comments

Comments
 (0)