The TryingToScale PHP framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
tts_framework/gulpfile.js

30 lines
740 B

/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
const { src, dest, series, parallel, watch } = require('gulp');
const exec = require('child_process').exec;
const php_source_files = [
'**/*.php',
'!**/dist/*.php'
];
function compile_php_files() {
return new Promise(function(resolve, reject) {
exec('php -f compiler.php', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
resolve(stdout);
});
});
}
function watch_php() {
process.chdir('src');
watch(php_source_files, compile_php_files);
}
exports.default = series(watch_php);