次のディレクトリ構造があります。
bower_components
node_modules
src
index.html
bower.json
package.json
gulpfile.js
.gitignore
次のように、bower の依存関係を注入するための gulp タスクがあります。
gulp.task('bower-inject', function () {
gulp.src('./index.html')
.pipe(wiredep())
.pipe(gulp.dest('./'));
});
index.html
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="src/assets/images/favicon.ico">
<title>ABC</title>
<!-- bower:css -->
<!-- endbower -->
<!-- inject:css -->
<!-- this is done with gulp inject which works as expected -->
<!-- endinject -->
</head>
<body ng-controller="AppController as appVm">
<div ui-view></div>
<!-- bower:js -->
<!-- endbower -->
<!-- inject:js -->
<!-- done via gulp-inject and works as expected -->
<!-- endinject -->
</body>
bower.json
"devDependencies": {
"angular": "1.4.0",
"angular-bootstrap": "~0.13.0",
"angular-ui-router": "~0.2.15",
"bootstrap": "~3.3.4",
"modernizr": "~2.8.3",
"font-awesome": "~4.3.0"
}
タスクを実行すると、次のように表示されます。
[00:24:50] Starting 'bower-inject'...
[00:24:50] Finished 'bower-inject' after 14 ms
ここで何が欠けているのか分かりますか?