咕噜usemin不影响HTML文件(index.html) [英] grunt usemin doesnt affect the html file(index.html)

查看:133
本文介绍了咕噜usemin不影响HTML文件(index.html)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用usemin的咕噜脚本,但奇怪的是index.html文件不受usemin的影响!这意味着我的文件仍然包含所有的

 <! -  build:css styles / main.css  - > 
< link rel =stylesheethref =styles / style.css>
< link rel =stylesheethref =styles / bs-growl-notifications.css>
<! - endbuild - >

日志中最奇怪的部分就是这个(尽管它找到了块, ):

 按HTML处理 -  dist / index.html 
更新HTML以引用我们的concat / min / revved脚本文件
使用新的css文件名更新HTML
使用新的img文件名更新HTML
使用data-main标签更新HTML
使用数据标签
使用背景图片更新HTML,case有一些内联样式
使用锚图片更新HTML
使用输入

以下是完整的日志:

 正在运行clean :dist(清洁)任务
清洁.tmp ...确定
清洁dist / index.html ...确定
清洁分类/脚本...确定
清洁分类/styles...OK

运行replace:dist(替换)任务
替换app / index.html - > .tmp / index.html

运行useminPrepare:html(useminPrepare)任务
检查.tmp / index.html以更新配置
寻找构建脚本HTML注释块

找到一个块:
<! - build:css styles / main.css - >
< link rel =stylesheethref =styles / style.css>
< link rel =stylesheethref =styles / bs-growl-notifications.css>
<! - endbuild - >
使用以下资源更新配置:
- .tmp\styles\stylestyle css
- .tmp\styles\bs-growl-notifications.css

找到一个块:
<! - build:js(app)scripts / components.js - >
< script src =bower_components / jquery / dist / jquery.js>< / script>
< script src =bower_components / handlebars / handlebars.runtime.js>< / script
>
< script src =bower_components / ember / ember.prod.js>< / script>
< script src =bower_components / ember-data / ember-data.prod.js>< / script>
<! - endbuild - >
使用以下资源更新配置:
- app\bower_components\jquery\dist\jquery.js
- app\bower_components\handlebars\handlebars.runtime.js
- app\bower_components\ember\ember.prod.js
- app\bower_components\ember-data\ember-data.prod.js

找到一个块:
<! - build:js(.tmp)scripts / templates.js - >
< script src =scripts / compiled-templates.js>< / script>
<! - endbuild - >
使用以下资源更新配置:
- .tmp \scripts \compiled-templates.js

找到一个块:
<! - - build :js(.tmp)scripts / main.js - >
< script src =scripts / combined-scripts.js>< / script>
<! - endbuild - >
使用以下资源更新配置:
- .tmp \scripts \combined-scripts.js

找到一个块:
<! - build :js scripts / plugins.js - >
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-core。
max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-alert
.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-badge
.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-basic
.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-butto
n.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-growl
-notifications.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-items
-action-bar.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-label
.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-list-
group.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-modal
.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-nav.m
ax.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-notif
ications.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-progr
essbar.max.js>< / script>
< script src =bower_components / ember-addons.bs_for_ember / dist / js / bs-wizar
d.max.js>< / script>
<! - endbuild - >
使用以下资源更新配置:
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-core.max.js
- .tmp \bower_components\ember-addons.bs_for_ember\dist\js\bs-alert.max.js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\ bs-badge.max.js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-basic.max.js
- .tmp\bower_components\\ \\ ember-addons.bs_for_ember \dist\js\bs-button.max.js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-growl-通知
ions.max.js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs- items-action-ba
r.max。 js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-label.max.js
- .tmp\bower_components\ember-ad dons.bs_for_ember\dist\js\bs一览group.max。
js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-modal.max.js
- .tmp\bower_components\\\mber -addons.bs_for_ember\dist\js\bs-nav.max.js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs- notifications.m
ax.js
- .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-progressbar.max
.js
- .tmp\\ \\ bower_components \ ember-addons.bs_for_ember \dist\js\bs-wizard.max.js

配置现在是:

cssmin:
{dist:
{files:
{'<%= yeoman.dist%> /styles/main.css':
['.tmp / styles / {,* /} * .css',
'app / styles / {,* /} *。css']}},
'dist\\styles\\main.css':'dist\\ \\\styles\\main.css'}

concat:
{'dist\\styles\\main.css ':
['.tmp\\styles\\style.css',
'.tmp\\styles\\\\bs-growl-notifications.css'],
'dist \\scripts \\components.js':
['app \\\\\\\\\\\\\\\' ,
'app \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\!! prod.js',
'app \\\\\\\\\\\\\\\\\'', \templates.js':['.tmp\\scripts\\compiled-templates.js'],
'dist \\scripts\\main.js':[' .tmp \\scripts \\combined-scripts.js'],
'dist \\scripts\\plugins.js':
['.tmp\\\ \\bower_components\\ember-addons.bs_for _ember \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\dist\\js\\bs-alert.max。
js',
'.tmp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
js',
'.tmp\\bower_components\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
js',
'.tmp\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ b .js',
'.tmp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ .max.js',
'.tmp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ on-bar.max.js',
'.tmp\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
js',
'.tmp\\\\\\\\\\\\\\\\\\\\\\\ list-group
.max.js',
'.tmp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
js',
'.tmp\\bower_components\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ b $ b',
'.tmp\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ b' .js',
',.tmp,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ js',
'.tmp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ]}

uglify:
{'dist \\\ scripts \\components.js':'dist \\scripts\\components.js',
'dist \\scripts \\templates.js':'dist \\scripts\\templates.js',
'dist \\scripts\\ main.js':'dist \\scripts\\main.js',
'dist \\scripts\\plugins.js':'dist \\scripts\\plugins.js'}

requirejs:
{}

运行concurrent:dist(并发)任务

运行imagemin:dist(imagemin)任务
精简的0图像(保存0 B)

完成,没有错误。

运行svgmin:dist(svgmin)任务

完成,没有错误。

运行htmlmin:dist(htmlmin)任务
创建文件dist / index.html。

完成,没有错误。

运行emberTemplates:dist(emberTemplates)任务
创建.tmp / scripts / compiled-templates.js文件。

完成,没有错误。

运行compass:dist(指南针)任务
目录.tmp / styles /
创建.tmp / styles / style.css(2.682s)
编译花了2.686s

完成,没有错误。

运行neuter:app(中性)任务

运行concat:dist\styles\main.css(concat)任务
文件 dist\styles\main.css创建。

运行concat:dist\scripts\components.js(concat)任务
创建文件dist \scripts\components.js。

运行concat:dist\scripts\templates.js(concat)任务
创建文件dist \scripts \templates.js。

运行concat:dist\scripts\main.js(concat)任务
创建文件dist\scripts\main.js。

运行concat:dist\scripts\plugins.js(concat)任务
创建文件dist \scripts\plugins.js。

运行cssmin:dist(cssmin)任务
创建文件dist / styles / main.css。

运行cssmin:dist\styles\main.css(cssmin)任务
创建文件dist\styles\main.css。

运行uglify:dist \scripts \components.js(uglify)任务
创建dist \ scriptscript \ componentone.js文件。

运行uglify:dist \scripts \templates.js(uglify)任务
创建文件dist \scripts \templates.js。

运行uglify:dist \scripts\main.js(uglify)任务
创建文件dist \scripts\main.js。

运行uglify:dist \scripts\plugins.js(uglify)任务
创建文件dist \scripts\plugins.js。

运行copy:fonts(复制)任务
复制了9个文件

运行copy:dist(复制)任务
复制了9个文件

运行rev:dist(rev)任务
dist / scripts / components.js>> bb1ae45b.components.js
dist / scripts / main.js>> 69c75525.main.js
dist / scripts / plugins.js>> d41d8cd9.plugins.js
dist / scripts / templates.js>> e425eb4f.templates.js
dist / styles / main.css>> 5baff5b5.main.css
dist / styles / fonts / FontAwesome.otf>> 543846b5.FontAwesome.otf
dist / styles / fonts / fontawesome-webfont.eot>> 906d33f8.fontawesome-webfont.eot
dist / styles / fonts / fontawesome-webfont.svg>> 776d58f4.fontawesome-webfont.svg
dist / styles / fonts / fontawesome-webfont.ttf>> 370c636d.fontawesome-webfont.ttf
dist / styles / fonts / fontawesome-webfont.woff>> 3f97f72d.fontawesome-webfont.woff
dist / styles / fonts / glyphicons-halflings-regular.eot>> e56f39cb.glyphicons-halfli
ngs-regular.eot
dist / styles / fonts / glyphicons-halflings-regular.svg>> 32941d63.glyphicons-halfli
ngs-regular.svg
dist / styles / fonts / glyphicons-halflings-regular.ttf>> 38e827a0.glyphicons-halfli
ngs-regular.ttf
dist / styles / fonts / glyphicons-halflings-regular.woff>> deae260a.glyphicons-halfl
ings-regular.woff

运行usemin:html(usemin)任务

按HTML处理 - dist / index.html
更新HTML以引用我们的concat / min / revved脚本文件
使用新的css文件名更新HTML
使用新的img文件名更新HTML
使用data-主要标签
使用数据标签更新HTML
使用背景图片更新HTML,案例中有一些内联样式
使用锚图片更新HTML
使用引用更新HTML输入

运行usemin:css(usemin)任务

处理为CSS - dist / styles / 5baff5b5.main.css
用新的img更新CSS文件名
url(../ styles / fonts / glyphicons-halflings-regular.eot)更改为url(../ styles / f
onts / e56f39cb.glyphicons-halflings-regular.eot)
url(../ styles / fonts / glyphicons-halflings-regular.eot?#iefix)改为url(../ s
tyles / fonts / e56f39cb.glyphicons-halflings-regular.eot?#iefix )
ur l(../ styles / fonts / glyphicons-halflings-regular.woff)改为url(../ styles /
fonts / deae260a.glyphicons-halflings-regular.woff)
url /styles/fonts/glyphicons-halflings-regular.ttf)更改为url(../ styles / f
onts / 38e827a0.glyphicons-halflings-regular.ttf)
url(../ styles /字体/ glyphicons-halflings-regular.svg#glyphicons_halflingsregular
)更改为url(../ styles / fonts / 32941d63.glyphicons-halflings-regular.svg#glyph
icons_halflingsregular)

完成,没有错误。


解决方案

确定这是最愚蠢的事情
看起来像usemin不能处理窗口的新行,所以它只是无声无息地更新html文件...
我已将所有新行更改为UNIX新行,并且它工作正常。 。



很难发现这个bug:($ / b>

i have a grunt script that uses usemin but the weird thing is is that the index.html file is not affected by usemin at all! it means that my file still has all the

    <!-- build:css styles/main.css -->
    <link rel="stylesheet" href="styles/style.css">
    <link rel="stylesheet" href="styles/bs-growl-notifications.css">
    <!-- endbuild -->

the weirdest part in the log is this(it does nothing although it found the blocks-see full log):

Processing as HTML - dist/index.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

and here is a full log:

Running "clean:dist" (clean) task
Cleaning .tmp...OK
Cleaning dist/index.html...OK
Cleaning dist/scripts...OK
Cleaning dist/styles...OK

Running "replace:dist" (replace) task
Replace app/index.html -> .tmp/index.html

Running "useminPrepare:html" (useminPrepare) task
Going through .tmp/index.html to update the config
Looking for build script HTML comment blocks

Found a block:
        <!-- build:css styles/main.css -->
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/bs-growl-notifications.css">
        <!-- endbuild -->
Updating config with the following assets:
    - .tmp\styles\style.css
    - .tmp\styles\bs-growl-notifications.css

Found a block:
        <!-- build:js(app) scripts/components.js -->
        <script src="bower_components/jquery/dist/jquery.js"></script>
        <script src="bower_components/handlebars/handlebars.runtime.js"></script
>
        <script src="bower_components/ember/ember.prod.js"></script>
        <script src="bower_components/ember-data/ember-data.prod.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - app\bower_components\jquery\dist\jquery.js
    - app\bower_components\handlebars\handlebars.runtime.js
    - app\bower_components\ember\ember.prod.js
    - app\bower_components\ember-data\ember-data.prod.js

Found a block:
        <!-- build:js(.tmp) scripts/templates.js -->
        <script src="scripts/compiled-templates.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - .tmp\scripts\compiled-templates.js

Found a block:
        <!-- build:js(.tmp) scripts/main.js -->
        <script src="scripts/combined-scripts.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - .tmp\scripts\combined-scripts.js

Found a block:
        <!-- build:js scripts/plugins.js -->
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-core.
max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-alert
.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-badge
.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-basic
.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-butto
n.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-growl
-notifications.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-items
-action-bar.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-label
.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-list-
group.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-modal
.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-nav.m
ax.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-notif
ications.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-progr
essbar.max.js"></script>
        <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-wizar
d.max.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-core.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-alert.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-badge.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-basic.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-button.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-growl-notificat
ions.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-items-action-ba
r.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-label.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-list-group.max.
js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-modal.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-nav.max.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-notifications.m
ax.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-progressbar.max
.js
    - .tmp\bower_components\ember-addons.bs_for_ember\dist\js\bs-wizard.max.js

Configuration is now:

  cssmin:
  { dist:
   { files:
      { '<%= yeoman.dist %>/styles/main.css':
         [ '.tmp/styles/{,*/}*.css',
           'app/styles/{,*/}*.css' ] } },
  'dist\\styles\\main.css': 'dist\\styles\\main.css' }

  concat:
  { 'dist\\styles\\main.css':
   [ '.tmp\\styles\\style.css',
     '.tmp\\styles\\bs-growl-notifications.css' ],
  'dist\\scripts\\components.js':
   [ 'app\\bower_components\\jquery\\dist\\jquery.js',
     'app\\bower_components\\handlebars\\handlebars.runtime.js',
     'app\\bower_components\\ember\\ember.prod.js',
     'app\\bower_components\\ember-data\\ember-data.prod.js' ],
  'dist\\scripts\\templates.js': [ '.tmp\\scripts\\compiled-templates.js' ],
  'dist\\scripts\\main.js': [ '.tmp\\scripts\\combined-scripts.js' ],
  'dist\\scripts\\plugins.js':
   [ '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-core.max.j
s',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-alert.max.
js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-badge.max.
js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-basic.max.
js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-button.max
.js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-growl-noti
fications.max.js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-items-acti
on-bar.max.js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-label.max.
js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-list-group
.max.js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-modal.max.
js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-nav.max.js
',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-notificati
ons.max.js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-progressba
r.max.js',
     '.tmp\\bower_components\\ember-addons.bs_for_ember\\dist\\js\\bs-wizard.max
.js' ] }

  uglify:
  { 'dist\\scripts\\components.js': 'dist\\scripts\\components.js',
  'dist\\scripts\\templates.js': 'dist\\scripts\\templates.js',
  'dist\\scripts\\main.js': 'dist\\scripts\\main.js',
  'dist\\scripts\\plugins.js': 'dist\\scripts\\plugins.js' }

  requirejs:
  {}

Running "concurrent:dist" (concurrent) task

Running "imagemin:dist" (imagemin) task
Minified 0 images (saved 0 B)

Done, without errors.

Running "svgmin:dist" (svgmin) task

Done, without errors.

Running "htmlmin:dist" (htmlmin) task
File dist/index.html created.

Done, without errors.

Running "emberTemplates:dist" (emberTemplates) task
File ".tmp/scripts/compiled-templates.js" created.

Done, without errors.

Running "compass:dist" (compass) task
directory .tmp/styles/
       create .tmp/styles/style.css (2.682s)
    Compilation took 2.686s

Done, without errors.

Running "neuter:app" (neuter) task

Running "concat:dist\styles\main.css" (concat) task
File "dist\styles\main.css" created.

Running "concat:dist\scripts\components.js" (concat) task
File "dist\scripts\components.js" created.

Running "concat:dist\scripts\templates.js" (concat) task
File "dist\scripts\templates.js" created.

Running "concat:dist\scripts\main.js" (concat) task
File "dist\scripts\main.js" created.

Running "concat:dist\scripts\plugins.js" (concat) task
File "dist\scripts\plugins.js" created.

Running "cssmin:dist" (cssmin) task
File dist/styles/main.css created.

Running "cssmin:dist\styles\main.css" (cssmin) task
File dist\styles\main.css created.

Running "uglify:dist\scripts\components.js" (uglify) task
File "dist\scripts\components.js" created.

Running "uglify:dist\scripts\templates.js" (uglify) task
File "dist\scripts\templates.js" created.

Running "uglify:dist\scripts\main.js" (uglify) task
File "dist\scripts\main.js" created.

Running "uglify:dist\scripts\plugins.js" (uglify) task
File "dist\scripts\plugins.js" created.

Running "copy:fonts" (copy) task
Copied 9 files

Running "copy:dist" (copy) task
Copied 9 files

Running "rev:dist" (rev) task
dist/scripts/components.js >> bb1ae45b.components.js
dist/scripts/main.js >> 69c75525.main.js
dist/scripts/plugins.js >> d41d8cd9.plugins.js
dist/scripts/templates.js >> e425eb4f.templates.js
dist/styles/main.css >> 5baff5b5.main.css
dist/styles/fonts/FontAwesome.otf >> 543846b5.FontAwesome.otf
dist/styles/fonts/fontawesome-webfont.eot >> 906d33f8.fontawesome-webfont.eot
dist/styles/fonts/fontawesome-webfont.svg >> 776d58f4.fontawesome-webfont.svg
dist/styles/fonts/fontawesome-webfont.ttf >> 370c636d.fontawesome-webfont.ttf
dist/styles/fonts/fontawesome-webfont.woff >> 3f97f72d.fontawesome-webfont.woff
dist/styles/fonts/glyphicons-halflings-regular.eot >> e56f39cb.glyphicons-halfli
ngs-regular.eot
dist/styles/fonts/glyphicons-halflings-regular.svg >> 32941d63.glyphicons-halfli
ngs-regular.svg
dist/styles/fonts/glyphicons-halflings-regular.ttf >> 38e827a0.glyphicons-halfli
ngs-regular.ttf
dist/styles/fonts/glyphicons-halflings-regular.woff >> deae260a.glyphicons-halfl
ings-regular.woff

Running "usemin:html" (usemin) task

Processing as HTML - dist/index.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Running "usemin:css" (usemin) task

Processing as CSS - dist/styles/5baff5b5.main.css
Update the CSS with new img filenames
url(../styles/fonts/glyphicons-halflings-regular.eot) changed to url(../styles/f
onts/e56f39cb.glyphicons-halflings-regular.eot)
url(../styles/fonts/glyphicons-halflings-regular.eot?#iefix) changed to url(../s
tyles/fonts/e56f39cb.glyphicons-halflings-regular.eot?#iefix)
url(../styles/fonts/glyphicons-halflings-regular.woff) changed to url(../styles/
fonts/deae260a.glyphicons-halflings-regular.woff)
url(../styles/fonts/glyphicons-halflings-regular.ttf) changed to url(../styles/f
onts/38e827a0.glyphicons-halflings-regular.ttf)
url(../styles/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular
) changed to url(../styles/fonts/32941d63.glyphicons-halflings-regular.svg#glyph
icons_halflingsregular)

Done, without errors.

解决方案

OK THIS IS THE MOST STUPID THING EVER seems like usemin cant handle windows new lines so it just fails silently to update the html file... i've changed all my new lines to UNIX new lines and it worked...

it was extremely hard to spot this bug :(

这篇关于咕噜usemin不影响HTML文件(index.html)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆