問題タブ [gulp-notify]
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.
javascript - Gulp Notify global success function
I'm looking to have gulp-notify success function that is called which I can reuse. I'm using the same format for all of my tasks and would like to clean it up. Here's an example of what I'm doing right now:
I'm re-using the same notify function with multiple tasks. I've tried doing something like this, but each attempt throws an error. This particular error is with plumber - Can't Pipe to Undefined
Any thoughts on how to accomplish this are appreciated!
EDIT After qballers solution, only issue is my gulp-size plugin returning undefined for file sizes:
docker - docker から gulp 通知を渡す方法は?
ローカル環境で docker の使用を拡大しようとしています (その過程で docker について詳しく学びます)。しかし、gulp-notify からの通知をデスクトップに戻すことについて質問があります。それらは私の端末ログに問題なく表示されます。
私の docker-compose ファイルには、local
このようなセクションが含まれています。
通常、私のgulpfileでは、このようなタスクを使用します
タスク自体は機能します (sass を css に変換します) が、エラーが発生した場合は通知機能が報告しgulp-notify: [Error running notifier] Could not send message: not found: notify-send
ます。
docker 内で gulp タスクを実行しているので、このままでは機能しないことは明らかだと思います。では、docker から通知メッセージを渡すにはどうすればよいでしょうか?
編集/更新ドッカーのドキュメントでこの情報を見つけました。しかし、私はそれが何を意味するのかを理解するのに十分な経験がありません。
javascript - ハード ドライブ上のプロジェクトのパス全体ではなく、Gulp-Notify を使用してターミナルにプロジェクト フォルダーのパスを表示する
タスクの実行時に端末に追加情報を表示するためにgulp-notifyを使用しています。現在、HD とファイル名のフル パスしか取得できません。よりクリーンなプロジェクト フォルダーのみを表示することをお勧めします。
ターミナルビュー
端末に「*quick-scope-for-6.mp4 を \dist\assets\video にコピーしました*」とだけ言ってもらいたいです
<%= folder.path %> と <%= directory.path %> を試しました