MCPcopy Create free account
hub / github.com/VemtoOrg/vemto2 / open

Method open

src/main/ProjectHandler.ts:31–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 }
30
31 static async open() {
32 console.log('Opening project...')
33
34 ProjectHandler.close()
35
36 ProjectHandler.projectIsOpen = true
37
38 console.log('START: Starting watcher...')
39
40 ProjectHandler.watcher = chokidar
41 .watch(ProjectPathResolver.getPath(), {
42 ignoreInitial: true,
43 ignored: [
44 /(^|[\/\\])\../,
45 /node_modules/,
46 /vendor/,
47 /vemto\.log/
48 ]
49 })
50 .on("change", (event) => {
51 ProjectHandler.window.webContents.send("files:changed", {
52 file: event
53 })
54 })
55 .on("add", (event) => {
56 ProjectHandler.window.webContents.send("files:changed", {
57 file: event
58 })
59 })
60 .on("unlink", (event) => {
61 ProjectHandler.window.webContents.send("files:changed", {
62 file: event
63 })
64 })
65
66 }
67
68 static async close() {
69 ProjectHandler.projectIsOpen = false

Callers 1

handleMethod · 0.45

Calls 3

logMethod · 0.45
closeMethod · 0.45
getPathMethod · 0.45

Tested by

no test coverage detected