我正在使用 grunt-usemin 构建一个应用程序项目
css 与绝对路径链接:
<!-- build:css(.) /app/css/libs.css -->
<link rel="stylesheet" href="/app-dev/lib/css/style.css"/>
<link rel="stylesheet" href="/app-dev/lib/css/another.css">
<!-- endbuild -->
javascript 文件与相对路径链接:
<!-- build:js js/app.js -->
<script src="js/app.js"></script>
<script src="js/services.js"></script>
<!-- endbuild -->
咕噜声配置:
useminPrepare: {
html: 'app-dev/index.html',
options: {
dest: 'app'
}
},
usemin: {
html: ['app/{,*/}*.html'],
css: ['app/css/{,*/}*.css'],
options: {
assetsDirs: ['app']
}
}
问题是 css 输出中有一个备用子文件夹级别:
app
- app
- - css
- - - libs.css
- js
- - app.js
- etc
而输出的html文件中的引用是正确的
<link rel="stylesheet" href="/app/css/libs.css">
如何将 css 输出到正确的文件夹层次结构?