HTML5 样板构建脚本 - .htaccess 不存在
我想我应该尝试一下 HTML5 Boilerplate 的构建脚本 - 它针对的是前端设计师和开发人员,所以这应该相当简单,对吧?
Paul 说,我用的是 Mac 跑步,所以我应该拥有我需要的一切。
在一个空白项目上尝试过,但立即碰壁了。
- 我运行 cd build 命令,将其指向我的本地文件夹
- 然后运行 ant build。看起来一切顺利,有一堆关于如何构建生产环境的胡言乱语,但在寻找 htaccess 文件时陷入困境......
构建失败 /Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/build/build.xml:137: 时发生以下错误 执行这一行: /Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/build/build.xml:673: 替换:源文件 /Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/publish/.htaccess 不存在
当然,.htaccess 文件不存在,因为它没有随 Boilerplate 下载一起提供。我是否需要从我的网站下载 htaccess 文件以便将其保存在本地?我不太明白这些东西 - 希望 Paul Irish 能让他的指示更全面:-(。
I thought I'd try out the Build Script for HTML5 Boilerplate - it's aimed at front-end designers and developers so this should be fairly straightforward right?
I'm running with a Mac so I should have all I need according to Paul.
Tried it on a blank project and immediately hit a brick wall.
- I ran the cd build command, pointing it to my local folder
- Then I ran ant build. It seemed to go OK, with a load of jibberish about how it was Building a Production environment but got stuck when looking for the htaccess file...
BUILD FAILED
/Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/build/build.xml:137:
The following error occurred while
executing this line:
/Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/build/build.xml:673:
Replace: source file
/Users/jaygeorge/Dropbox/Websites/Clients/HTML-Sandbox/publish/.htaccess
doesn't exist
Well of course the .htaccess file doesn't exist because it didn't come with the Boilerplate download. Do I need to download the htaccess file from my website so that it sits locally? I don't really understand this stuff - Was hoping Paul Irish would make his instructions more comprehensive :-(.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您下载的 ZIP 文件的根文件夹中应该有一个 .htaccess 文件。请注意,您可能必须在文件资源管理器中打开“查看隐藏文件”或类似功能才能看到它。
There should be an .htaccess file in the root folder of the ZIP file you downloaded. Note that you may have to turn on 'view hidden files' or similar in your File Explorer to see it.
尝试创建空的 .htaccess 文件并从以下位置复制/粘贴代码: http://html5boilerplate.com/
Try to make empty .htaccess file and copy/paste code from: http://html5boilerplate.com/