【发布时间】:2014-05-09 21:01:20
【问题描述】:
创建项目 JavaScript 项目时,我的标准文件布局如下所示:
project-name/
|- bower_components/
|- node_modules/
|- src/
|- tests/
|- .csslintrc
|- .jshintrc
|- .htmlhintrc
|- bower.json
|- Gruntfile.js
`- package.json
node_modules 和 bower_components 是标准的。我还注意到src 或www 是源文件的某种标准,spec、specs、test 或tests 主要用于测试。 dist 用于放置可发布文件非常常见。
但是,我也经常得到生成的文件,例如从我的less 文件生成的css。这些文件在发布时属于dist 文件夹,但是在网络服务器上进行本地测试时,是否有某种标准可以将这些文件放在哪里?倾向于使用bower_components,因为它已经托管在本地网络服务器上,但感觉不对。
【问题讨论】: