Skip to content

Commit bda8193

Browse files
Ignore library.txt for project building.
1 parent 18adf92 commit bda8193

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

source/editor/plugins/phasereditor2d.ide/src/IDEPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace phasereditor2d.ide {
9797

9898
for (const ext of exts) {
9999

100-
await ext.preload(monitor);
100+
await ext.compile(monitor);
101101
}
102102

103103
dlg.close();

source/editor/plugins/phasereditor2d.ide/src/core/CompileProjectExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ namespace phasereditor2d.ide.core {
1212

1313
abstract getTotal(): number;
1414

15-
abstract preload(monitor: controls.IProgressMonitor);
15+
abstract compile(monitor: controls.IProgressMonitor): Promise<void>;
1616
}
1717
}

source/editor/plugins/phasereditor2d.ide/src/core/code/CodeUtils.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ namespace phasereditor2d.ide.core.code {
22

33
import io = colibri.core.io;
44

5+
export function isLibraryFile(file: io.FilePath) {
6+
7+
if (file.isRoot()) {
8+
9+
return false;
10+
}
11+
12+
if (file.getSibling("library.txt")) {
13+
14+
return true;
15+
}
16+
17+
return isLibraryFile(file.getParent());
18+
}
19+
520
export function isNodeModuleFile(file: io.FilePath) {
621

722
if (file.isFolder() && file.getName() === "node_modules") {

source/editor/plugins/phasereditor2d.scene/src/core/code/SceneCompileAllExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace phasereditor2d.scene.core.code {
3232
scene.destroyGame();
3333
}
3434

35-
async preload(monitor: colibri.ui.controls.IProgressMonitor) {
35+
async compile(monitor: colibri.ui.controls.IProgressMonitor) {
3636

3737
const files = this.getFiles();
3838

source/editor/plugins/phasereditor2d.scene/src/core/json/SceneFinder.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ namespace phasereditor2d.scene.core.json {
312312
return this._compFilename_Data_Map.get(file.getFullName());
313313
}
314314

315-
getUserComponentsModels(includeNodeModules = true) {
315+
getUserComponentsModels(includeLibraryFiles = true) {
316316

317-
if (!includeNodeModules) {
317+
if (!includeLibraryFiles) {
318318

319319
return this._compModelsInfo
320-
.filter(info => !ide.core.code.isNodeModuleFile(info.file))
320+
.filter(info => !ide.core.code.isNodeModuleFile(info.file) && !ide.core.code.isLibraryFile(info.file))
321321
}
322322

323323
return this._compModelsInfo;
@@ -358,12 +358,12 @@ namespace phasereditor2d.scene.core.json {
358358
return null;
359359
}
360360

361-
getSceneFiles(includeNodeModules = true) {
361+
getSceneFiles(includeLibraryFiles = true) {
362362

363-
if (!includeNodeModules) {
363+
if (!includeLibraryFiles) {
364364

365365
return this._sceneFiles
366-
.filter(f => !ide.core.code.isNodeModuleFile(f))
366+
.filter(f => !ide.core.code.isNodeModuleFile(f) && !ide.core.code.isLibraryFile(f))
367367
}
368368

369369
return this._sceneFiles;

source/editor/plugins/phasereditor2d.scene/src/ui/editor/usercomponent/UserComponentCompileAllExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace phasereditor2d.scene.ui.editor.usercomponent {
99
return finder.getUserComponentsModels().length;
1010
}
1111

12-
async preload(monitor: colibri.ui.controls.IProgressMonitor) {
12+
async compile(monitor: colibri.ui.controls.IProgressMonitor) {
1313

1414
const finder = ScenePlugin.getInstance().getSceneFinder();
1515

0 commit comments

Comments
 (0)