如何在每次成功的laravel混音构建中执行工匠命令?
答案 0 :(得分:1)
let mix = require('laravel-mix');
let child_process = require('child_process');
mix.js('Resources/js/core-app.js', 'Assets/js')
.then(() => {
child_process.exec('php artisan module:publish', {cwd: '../../'}, function(error, stdout, stderr){
if (error) throw error;
console.log(stdout, stderr);
});
});