As mentioned in #46, this PR adds a Node-based build system.
The build system basically works as such:
build
.addSourceFile("src/engineDebug.js") // adds a source file, files are stitched together in given order
...
.setOutputFile(`build/${ENGINE_NAME}.min.js`) // sets the target output file
// build steps are executed after the output file has been stitched together and written to disk
.addBuildStep(closureCompilerStep)
.addBuildStep(uglifyBuildStep)
.addBuildStep((filename) => fs.writeFileSync(`${filename}.sha`, sha256(fs.readFileSync(filename)))) // maybe output a hash of the output?
.build();
EDIT: Fixed error with closure compiler, everything looks identical to output of original build script now!
Let me know what you think of it overall and definitely open to feedback. Just did this on a whim
As mentioned in #46, this PR adds a Node-based build system.
The build system basically works as such:
EDIT: Fixed error with closure compiler, everything looks identical to output of original build script now!
Let me know what you think of it overall and definitely open to feedback. Just did this on a whim