Yeoman-php项目
我正在开始一个新的php项目,并尝试为我学习新技术。格朗特、约曼等 现在我想开始一个php项目,并从中找到了这个示例。就我所想,我的一切都正常,但我无法使用grunt服务器运行我的本地开发站点。我得到一个错误:Yeoman-php项目,php,gruntjs,Php,Gruntjs,我正在开始一个新的php项目,并尝试为我学习新技术。格朗特、约曼等 现在我想开始一个php项目,并从中找到了这个示例。就我所想,我的一切都正常,但我无法使用grunt服务器运行我的本地开发站点。我得到一个错误: Running "php:server" (php) task Invalid address: http://localhost/myproject.nl:80 我有以下文件夹结构: \应用程序\XAMPP\xamppfiles\htdocs\myproject.
Running "php:server" (php) task
Invalid address: http://localhost/myproject.nl:80
我有以下文件夹结构:
\应用程序\XAMPP\xamppfiles\htdocs\myproject.nl\
在此文件夹下:
myproject\
|--.sass-cache\
|--.tmp\
|--app\
|--dist\
|--node_modules\
|--bower.json
|--Grunftile.js
|--package.jason
|--router-dist.php
|--router.php
在Gruntfile.js中,此代码与dev URL一起放置在代码中:
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// CONFIGURABLE PATHS
// The yeomanConfig object contains file paths and other "constants" that are used throughout
// The rest of this Gruntfile. Basically, any value that is used in multiple places should be
// put here for ease of maintenance. Update the value here, and all other places are updated
// automagically.
var yeomanConfig = {
app: 'app',
dist: 'dist',
siteURL: 'www.myproject.nl',
devURL: 'http://localhost/myproject.nl',
devPort: 80
};
我也试过这个devURLhttp://localhost/myproject.nl/myproject/dist:,但也不起作用。在这种情况下,devURL应该是什么
PS:我还想运行一个本地数据库,我正在使用XAMPP来实现这一点。你知道这一点吗?@kendall,不,我没有。我想我可能有一个解决方案,但仍在努力……但是一些见解。。。我正在使用grunt编译一个开发配置,将文件从./app复制到xampp/htdocs/app,而不是.tmp,然后尝试在grunt监视./app并更新xampp时使用浏览器同步来监视xampp中的文件。我已经让它工作,除了浏览器同步部分。。。。