Last active
June 19, 2018 12:40
-
-
Save ptflp/0d5ec0145eba4c23cdb9ceef103789f0 to your computer and use it in GitHub Desktop.
Yii2 gulp 4 file reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
gulp = require("gulp"), | |
browserSync = require('browser-sync').create(), | |
childProcess = require('child_process'); | |
gulp.task('docker-start', function (callback) { | |
console.log("---------Start--------------------------"); | |
return childProcess.exec('Powershell.exe -executionpolicy remotesigned -File docker.ps1', function (err, stdout, stderr) { | |
console.log(stdout); | |
console.log(stderr); | |
if (err) console.log(err); | |
console.log("Finished"); | |
}); | |
}); | |
gulp.task('watch', function () { | |
gulp.watch("./**/*.php").on('change', gulp.parallel(browserSync.reload)); | |
}); | |
gulp.task('ws', function() { | |
browserSync.init({ | |
proxy: "localhost:8000", | |
notify: false, | |
snippetOptions: { | |
rule: { | |
match: /$/ | |
} | |
} | |
}); | |
}); | |
gulp.task('init', gulp.series('docker-start','ws')); | |
gulp.task("default",gulp.parallel('watch','docker-start','ws')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment