問題タブ [grunt-plugins]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
gruntjs - デフォルトの Grunt キーではない glob パターンの使用
1. まとめ
すべてのファイルで機能するgrunt-clean-consoleプラグインを設定できません。.html
2. 詳細
grunt-clean-console ファイルのブラウザ コンソール エラーをチェックし.html
ます。
.html
サイトのすべてのファイルのブラウザ コンソール エラーを確認したい。私が読んだ公式url
の説明では、キーの特定の値に対してプラグインがどのように機能するか。私のサイトには多くのページがあります。.html
各ファイルを個別に追加したくありません。しかし、パターンを使用する方法が見つかりません。
cwd
組み込みの Grunt 、src
、dest
キーのパターンを使用できることがわかりました。url
しかし、このプラグインの時点でカスタム キーに glob (または別の) パターンを使用するにはどうすればよいでしょうか?
3. データ
/li>Gruntfile.coffee
:プロジェクト構成の例:
/li>
/li>url
上記の例のように、パターンなしでキーに特定の値を設定すると、grunt-clean-console が正常に動作します。
3.1. 再現する手順
私はコンソールで実行します:
4.助けられなかった
4.1. グロビング
/li>Gruntfile.coffee
:出力:
/li>
4.2. オブジェクトを動的に構築する
/li>Gruntfile.coffee
(例):出力:
/li>
4.3. テンプレート
/li>Gruntfile.coffee
:出力:
/li>