Skip to content

Commit

Permalink
devtools aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 5, 2024
1 parent c9a211b commit 765f9c6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 19 deletions.
5 changes: 2 additions & 3 deletions fish/aliases.fish
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ alias reportunit 'yarn jest (find report -iname "*-test.js" | grep -v axe)'
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'

# dt. rpp
# 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
alias rppunit 'npm run unittest -- --expanded-reporting --mocha-fgrep=Processor\|Timeline\|trace\|Trace\|Appender\|Handler\|Performance\|Annotation\|Flame'
alias rppinter 'npm run interactionstest -- --test-file-pattern="*/performance/**"'
alias rppunit 'npm test -- front_end/panels/timeline/ front_end/models/trace front_end/ui/legacy/components/perf_ui'
alias rppinter 'npm run test -- test/e2e/performance/'
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/**"'

abbr xpraclient "xpra attach --video-scaling=off --desktop-scaling=off --dpi=96 --ssh=/usr/bin/ssh 'ssh://glurp/:110'"
Expand Down
27 changes: 27 additions & 0 deletions fish/chromium.fish
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,33 @@ function dtcr --description "run chrome with dev devtools"
eval $cmd
end



function dtcrcanary --description "run chrome canary with dev devtools"

# function handle_int --on-signal SIGINT
# echo Got SIGINT
# end

set -l cdup (git rev-parse --show-cdup)
set -l crpath "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
set -l dtpath (realpath out/Default/gen/front_end)
if test ! -e "$dtpath/devtools_app.html"
echo "Not found at: $dtpath/devtools_app.html"
set dtpath (realpath out/Default/gen)
end
if test ! -e "$dtpath/devtools_app.html" # elsa?
echo "Not found at: $dtpath/devtools_app.html ... \nBailing"; return 1
end

# 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))
# 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>"
# used to use component-server --traces but nah.. http://localhost:11010/
set -l cmd "$crpath --custom-devtools-frontend=file://$dtpath --user-data-dir=$HOME/chromium-devtools/dt-chrome-profile $clutch_chrome_flags $argv "
echo " > $cmd"
eval $cmd
end

function dtbcr --description "build chromium, then open it"
if dtb
dtcr
Expand Down
16 changes: 0 additions & 16 deletions fish/functions.fish
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,6 @@ function shellswitch
chsh -s (brew --prefix)/bin/$argv
end

function upgradeyarn
curl -o- -L https://yarnpkg.com/install.sh | bash
end

function fuck -d 'Correct your previous console command'
set -l exit_code $status
set -l eval_script (mktemp 2>/dev/null ; or mktemp -t 'thefuck')
set -l fucked_up_commandd $history[1]
thefuck $fucked_up_commandd > $eval_script
. $eval_script
rm $eval_script
if test $exit_code -ne 0
history --delete $fucked_up_commandd
end
end

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



function conda -d 'lazy initialize conda'
functions --erase conda
eval /opt/miniconda3/bin/conda "shell.fish" "hook" | source
Expand Down

0 comments on commit 765f9c6

Please sign in to comment.