Featured image of post grunt-bower-installの代わりにgrunt-wiredepを使ってみた

grunt-bower-installの代わりにgrunt-wiredepを使ってみた

はよく使うのですが、今日yeomanを使っていたらこんな表示がでてきました

@nqounetです。

grunt bowerInstallはよく使うのですが、今日yeomanを使っていたらこんな表示がでてきました。

1
npm WARN deprecated grunt-bower-install@1.6.0: use grunt-wiredep instead

grunt-bower-installは非推奨だからgrunt-wiredepを使えということなので、早速使ってみましょう。

新しいもの好きにも程がある

コマンドは以下のとおりです。

1
2
npm uninstall -D grunt-bower-install
npm install -D grunt-wiredep

grunt-bower-installの代わりにgrunt-wiredepを入れます。

サンプルページでは、タスクのbowerInstallはそのまま活かすような感じなのですが、Gruntfile.jsをそのままにしてタスクを実行すると怒られます。

1
Warning: Task "wiredep" failed. Use --force to continue.

なので、タスク名はちゃんと変更する必要があります。

1
2
3
4
5
6
wiredep: {
    app: {
        src: ['<%= config.app %>/index.html'],
        exclude: []
    }
},

中身(タスクの設定)はそのままでも動いています。

…まあ、シンプルな設定だからだとは思いますが。

いずれはgeneratorが変更になるとは思いますが、しかし、移ろいやすいですね。

まだしばらくは問題無いとは思いますが、早めの対応に越したことはないですね。

参考になる資料

comments powered by Disqus
Hugo で構築されています。
テーマ StackJimmy によって設計されています。