[Ivan Diaz] - Add php server to gulp

This commit is contained in:
Ivan Diaz 2015-09-24 20:00:29 -03:00
parent 30411af575
commit e0af6cf0ea
5 changed files with 19 additions and 1 deletions

View File

@ -9,6 +9,11 @@ module.exports = {
'dest': './build/js/'
},
'phpserver': {
'base': './src/server/',
'port': 8000
},
'images': {
'src': './src/assets/images/**/*.{jpeg,jpg,png}',
'dest': './build/images/'

View File

@ -10,6 +10,6 @@ gulp.task('dev', ['clean'], function(callback) {
global.isProd = false;
// Run all tasks once
return runSequence(['sass', 'imagemin', 'browserify', 'copyFonts', 'copyIndex', 'copyIcons'], 'watch', callback);
return runSequence(['sass', 'imagemin', 'browserify', 'copyFonts', 'copyIndex', 'copyIcons', 'serverphp'], 'watch', callback);
});

9
gulp/tasks/serverphp.js Normal file
View File

@ -0,0 +1,9 @@
'use strict';
var config = require('../config');
var gulp = require('gulp');
var connect = require('gulp-connect-php');
gulp.task('serverphp', function() {
connect.server(config.phpserver);
});

View File

@ -32,6 +32,7 @@
"express": "^4.13.1",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.1",
"gulp-connect-php": "0.0.5",
"gulp-if": "^1.2.5",
"gulp-imagemin": "^2.3.0",
"gulp-notify": "^2.2.0",

3
src/server/index.php Normal file
View File

@ -0,0 +1,3 @@
<?php
echo 'hellos';
?>