This commit is contained in:
Zengtudor 2024-08-11 19:49:08 +08:00
parent 8f71165206
commit f4e2104a60
5 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import projects from "../Store/ProjectStore"
import printDebug from "../Tools/DebugPrint"
const project = (name:string,callback:Function) =>{

View File

@ -0,0 +1,5 @@
import Project from "../Project/Project";
const projects:Project[] = []
export default projects

View File

@ -0,0 +1,9 @@
import NmakeGlobal from "../interface/NmakeGlobal"
const constructGlobal = ()=>{
(global as any).projects = [];
const nmakeGlobal = global as unknown as NmakeGlobal
}
export default constructGlobal

View File

@ -2,6 +2,8 @@ import path from "path";
import printDebug from "./Tools/DebugPrint";
import { existsSync } from "fs";
import printErrorOrDebug from "./Tools/PrintErrorOrDebug";
import projects from "./Store/ProjectStore";
import constructGlobal from "./Tools/ConstructGlobal";
const argv = require('minimist')(process.argv.slice(2))
@ -20,6 +22,9 @@ printDebug("found nmake file")
printDebug("adding ts-node")
require("ts-node").register()
printDebug("adding global values")
constructGlobal();
printDebug(`running file ${nmakeFilePath}`)
require(nmakeFilePath)
printDebug(`run completion!`,nmakeFilePath)

View File

@ -0,0 +1,5 @@
import Project from "../Project/Project";
export default interface NmakeGlobal{
projects:{[key:string]:Project}
}