Skip to content

Commit 765f9c6

Browse files
committed
devtools aliases
1 parent c9a211b commit 765f9c6

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

fish/aliases.fish

+2-3
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ alias reportunit 'yarn jest (find report -iname "*-test.js" | grep -v axe)'
172172
alias reportwatch 'watchexec "node build/build-report-components.js && node build/build-report.js --psi && node build/build-sample-reports.js && echo \$(date) && yarn eslint --fix report/renderer/components.js" && bash core/scripts/copy-util-commonjs.sh'
173173

174174
# dt. rpp
175-
# in the future this will be: yarn test front_end/panels/timeline/ front_end/models/trace front_end/services/annotations_manager front_end/ui/legacy/components/perf_ui
176-
alias rppunit 'npm run unittest -- --expanded-reporting --mocha-fgrep=Processor\|Timeline\|trace\|Trace\|Appender\|Handler\|Performance\|Annotation\|Flame'
177-
alias rppinter 'npm run interactionstest -- --test-file-pattern="*/performance/**"'
175+
alias rppunit 'npm test -- front_end/panels/timeline/ front_end/models/trace front_end/ui/legacy/components/perf_ui'
176+
alias rppinter 'npm run test -- test/e2e/performance/'
178177
alias rppscreen 'third_party/node/node.py --output scripts/test/run_test_suite.js --config test/interactions/test-runner-config.json --mocha-fgrep "[screenshot]" --test-file-pattern="*/performance/**"'
179178

180179
abbr xpraclient "xpra attach --video-scaling=off --desktop-scaling=off --dpi=96 --ssh=/usr/bin/ssh 'ssh://glurp/:110'"

fish/chromium.fish

+27
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,33 @@ function dtcr --description "run chrome with dev devtools"
111111
eval $cmd
112112
end
113113

114+
115+
116+
function dtcrcanary --description "run chrome canary with dev devtools"
117+
118+
# function handle_int --on-signal SIGINT
119+
# echo Got SIGINT
120+
# end
121+
122+
set -l cdup (git rev-parse --show-cdup)
123+
set -l crpath "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
124+
set -l dtpath (realpath out/Default/gen/front_end)
125+
if test ! -e "$dtpath/devtools_app.html"
126+
echo "Not found at: $dtpath/devtools_app.html"
127+
set dtpath (realpath out/Default/gen)
128+
end
129+
if test ! -e "$dtpath/devtools_app.html" # elsa?
130+
echo "Not found at: $dtpath/devtools_app.html ... \nBailing"; return 1
131+
end
132+
133+
# A lil landing page that gives me the local loadTimelineFromURL url to load directly (as we can't have chrome open it (or navigate to it))
134+
# set -l landing_url "data:text/html;charset=utf-8,<p>hi.<p><textarea cols=100>devtools://devtools/bundled/devtools_app.html?loadTimelineFromURL=http://localhost:9435/ikea-latencyinfoflow.json</textarea><p><textarea cols=100>devtools://devtools/bundled/devtools_app.html</textarea>"
135+
# used to use component-server --traces but nah.. http://localhost:11010/
136+
set -l cmd "$crpath --custom-devtools-frontend=file://$dtpath --user-data-dir=$HOME/chromium-devtools/dt-chrome-profile $clutch_chrome_flags $argv "
137+
echo " > $cmd"
138+
eval $cmd
139+
end
140+
114141
function dtbcr --description "build chromium, then open it"
115142
if dtb
116143
dtcr

fish/functions.fish

-16
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,6 @@ function shellswitch
126126
chsh -s (brew --prefix)/bin/$argv
127127
end
128128

129-
function upgradeyarn
130-
curl -o- -L https://yarnpkg.com/install.sh | bash
131-
end
132-
133-
function fuck -d 'Correct your previous console command'
134-
set -l exit_code $status
135-
set -l eval_script (mktemp 2>/dev/null ; or mktemp -t 'thefuck')
136-
set -l fucked_up_commandd $history[1]
137-
thefuck $fucked_up_commandd > $eval_script
138-
. $eval_script
139-
rm $eval_script
140-
if test $exit_code -ne 0
141-
history --delete $fucked_up_commandd
142-
end
143-
end
144129

145130
# requires my excellent `npm install -g statikk`
146131
function server -d 'Start a HTTP server in the current dir, optionally specifying the port'
@@ -160,7 +145,6 @@ function server -d 'Start a HTTP server in the current dir, optionally specifyin
160145
end
161146

162147

163-
164148
function conda -d 'lazy initialize conda'
165149
functions --erase conda
166150
eval /opt/miniconda3/bin/conda "shell.fish" "hook" | source

0 commit comments

Comments
 (0)