update
This commit is contained in:
parent
8f71165206
commit
f4e2104a60
@ -1,3 +1,4 @@
|
||||
import projects from "../Store/ProjectStore"
|
||||
import printDebug from "../Tools/DebugPrint"
|
||||
|
||||
const project = (name:string,callback:Function) =>{
|
||||
|
5
src/Store/ProjectStore.ts
Normal file
5
src/Store/ProjectStore.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import Project from "../Project/Project";
|
||||
|
||||
const projects:Project[] = []
|
||||
|
||||
export default projects
|
9
src/Tools/ConstructGlobal.ts
Normal file
9
src/Tools/ConstructGlobal.ts
Normal 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
|
@ -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)
|
||||
|
5
src/interface/NmakeGlobal.ts
Normal file
5
src/interface/NmakeGlobal.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import Project from "../Project/Project";
|
||||
|
||||
export default interface NmakeGlobal{
|
||||
projects:{[key:string]:Project}
|
||||
}
|
Loading…
Reference in New Issue
Block a user