我使用wiredep自动将ckeditor和ng-file-upload包含到我的索引模板和karma.conf.js中。 我的项目由jhipster引导。 对于ckeditor包,我必须包含两个文件,ckeditor.js和ckeditor-angularjs.js,但是wiredep不会复制这些文件...(我不会将这些文件放到我的index.html和我的karma.conf.js)。
在我的bower.json中,我有这个声明(做完bower安装后的ckeditor-angularjs --save):
"dependencies": {
"ckeditor-angularjs": "*"
}
我的Gruntfile.js:
wiredep: {
app: {
src: ['src/main/webapp/index.html'],
exclude: [
/angular-i18n/ // localizations are loaded dynamically
]
},
test: {
src: 'src/test/javascript/karma.conf.js',
exclude: [/angular-i18n/, /angular-scenario/],
ignorePath: /\.\.\/\.\.\//, // remove ../../ from paths of injected javascripts
devDependencies: true,
fileTypes: {
js: {
block: /(([\s\t]*)\/\/\s*bower:*(\S*))(\n|\r|.)*?(\/\/\s*endbower)/gi,
detect: {
js: /'(.*\.js)'/gi
},
replace: {
js: '\'{{filePath}}\','
}
}
}
}
}
我在bower.json中使用覆盖选项进行了测试,但它无法工作......:
"overrides": {
"bootstrap": {
"main": [
"dist/js/bootstrap.js",
"dist/css/bootstrap.css",
"less/bootstrap.less"
]
},
"ckeditor-angularjs": {
"main": [
"./src/main/webapp/bower_components/ckeditor/ckeditor.js",
"build/ckeditor-angularjs.min.js"
]
},
"ng-file-upload": {
"main": "ng-file-upload-all.js"
}
}
当我这样做时:grunt wiredep,我有这个错误:
Warning: Maximum call stack size exceeded Use --force to continue. Aborted due to warnings.
使用--force -v param:
Warning: Error: angular is not installed. Try running `bower install`. Used --force, continuing.
Done, but with warnings.
我认为角度包装不是问题...
你知道我怎么解决这个问题? 感谢。