我使用yeoman生成器创建了webapp。在新的应用程序上,我运行了:grunt build --verbose,并且有这个错误:
Files: app/index.html -> html
Options: dest="dist"
Going through app/index.html to update the config
Looking for build script HTML comment blocks
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
Aborted due to warnings.这是我的package.json
{
"private": true,
"devDependencies": {
"autoprefixer": "^6.0.2",
"babel-preset-es2015": "^6.1.18",
"grunt": "^0.4.5",
"grunt-babel": "^6.0.0",
"grunt-browser-sync": "^2.1.2",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-cssmin": "^0.12.2",
"grunt-contrib-htmlmin": "^0.4.0",
"grunt-contrib-imagemin": "^1.0.0",
"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-eslint": "^17.0.0",
"grunt-filerev": "^2.2.0",
"grunt-mocha": "^0.4.12",
"grunt-newer": "^1.1.0",
"grunt-postcss": "^0.6.0",
"grunt-sass": "^1.0.0",
"grunt-svgmin": "^2.0.1",
"grunt-usemin": "^3.0.0",
"grunt-wiredep": "^2.0.0",
"jit-grunt": "^0.9.1",
"time-grunt": "^1.1.0"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test"
},
"eslintConfig": {
"extends": [
"eslint:recommended"
],
"env": {
"node": true,
"browser": true,
"es6": true,
"jquery": true,
"mocha": true
},
"rules": {
"quotes": [
2,
"single"
],
"indent": [
2,
2
]
}
}
}有谁可以帮我?我之前所做的只是更新到新的npm版本和yeoman。
编辑
这是index.html文件,我也尝试了非常基本的html,只有HTML头和主体标签。
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8">
<title>test2</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
</body>
</html>发布于 2016-01-30 01:36:42
检查您的imagemin任务中是否有额外的%。
https://stackoverflow.com/questions/34980422
复制相似问题