Gulp-webapp running BrowserSync and PHP
FWIW, I've got a quite simple and fair solution for that by placing the compiled .css file in the app/ root and moving /bower_dependencies folder inside the app/ folder.
For Sass, I only needed to change the path in the placeholder to <!-- build:css styles/main.css -->
and change the dest
in the styles
task.
For the bower_components, I just edited bower_components in .bowerrc:
{
"directory": "app/bower_components"
}
and added this to the wiredep
stream in gulpfile.js:
fileTypes: {
scss: {
replace: {
scss: '@import "app/{{filePath}}";'
}
}
},
Gulp PHP with BrowserSync and a proxy server throwing error
There was a bad install of http-proxy and/or gulp-php-connect. I uninstalled them, cleared npm cache, and did a fresh install. Everything worked fine after that.
GULP 4 - Using browsersync with PHP prompts for download
It turns out I really am a noob when it comes to Gulp and BrowserSync.
The correct configuration is:
gulp.task('browserSync', function() {
phpConnect.server({
base:'./build/',
hostname:'127.0.0.1'
}, function (){
browserSync.init({
proxy: "127.0.0.1:8000"
});
});
});
because I'm trying to use the PHP Development Server on port 8000 and BrowserSync as PROXY not as a SERVER. Dumb me.
I hope this will save some time to someone in the same situation.
Related Topics
Accented Characters in MySQL Table
PHP Put a Space in Front of Capitals in a String (Regex)
Best Way to Delete "Column" from Multidimensional Array
How to Keep Form Values After Post
Most Efficient Way to Get Next Letter in the Alphabet Using PHP
Http://Localhost/ Not Working on Windows 7. What's the Problem
How to Send a Http/2 Post Request in PHP
How to Escape String from PHP for JavaScript
What Is Difference of Developing a Website in MVC and 3-Tier or N-Tier Architecture
Difference Between Set_Time_Limit() and Ini_Set('Max_Execution_Time', ...)
Mp4 Plays When Accessed Directly, But Not When Read Through PHP, on iOS
PHP - Create Simple Animated Gif from Two Jpeg Images