Pao*_*olo 7 customization compilation jshint twitter-bootstrap
我刚刚安装并配置了环境,以在本地构建自定义版本的Twitter Bootstrap.
这就是我做的:
make build以编译Bootstrap第5步:
~/devel/parking/bootstrap$ make build
jshint js/*.js --config js/.jshintrc
js/bootstrap-affix.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-alert.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-button.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-carousel.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-collapse.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-dropdown.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-modal.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-popover.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-scrollspy.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-tab.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-tooltip.js: line 24, col 17, Bad option: ';_;'.
js/bootstrap-transition.js: line 23, col 17, Bad option: ';_;'.
js/bootstrap-typeahead.js: line 23, col 17, Bad option: ';_;'.
13 errors
make: *** [test] Error 2
Run Code Online (Sandbox Code Playgroud)
第23行:
"use strict"; // jshint ;_;
Run Code Online (Sandbox Code Playgroud)
我能够解决// jshint ;_;从第23行删除的问题.虽然,我宁愿保持Bootstrap源不受影响.
如何摆脱这些错误以及"错误选项"错误的含义是什么?
JS/.jshintrc:
{
"validthis": true,
"laxcomma" : true,
"laxbreak" : true,
"browser" : true,
"eqnull" : true,
"debug" : true,
"devel" : true,
"boss" : true,
"expr" : true,
"asi" : true
}
Run Code Online (Sandbox Code Playgroud)
Dyl*_*ade 17
今天的问题是JSHint的最新版本与当前的Bootstrap Makefile不兼容,因为之前的静默警告现在会抛出错误.
删除JSHint npm uninstall jshint,然后安装0.9.1版npm install jshint@0.9.1.最后运行make并成功编译.
小智 4
我刚才遇到了同样的错误,在搜索了 bootstrap 问题后,
我找到了解决方案,请查看这些: https: //github.com/twitter/bootstrap/pull/5244 https://github.com/twitter/bootstrap/issues/7043