Giter Site home page Giter Site logo

feishu / ant-devtools-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linwaiwai/ant-devtools-frontend

0.0 2.0 0.0 17.77 MB

License: BSD 3-Clause "New" or "Revised" License

Python 1.26% JavaScript 94.03% CSS 3.98% HTML 0.01% Dockerfile 0.01% Java 0.68% Shell 0.02% TypeScript 0.01%

ant-devtools-frontend's Introduction

Chrome DevTools frontend

The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.

It is available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES2015 modules, so consuming this package in other tools may require some effort.

Package versioning

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Source code

The frontend is available through a git subtree mirror on chromium.googlesource.com, with a regularly updating GitHub mirror at github.com/ChromeDevTools/devtools-frontend. The codebase's true location is in third_party/WebKit/Source/devtools/ in Chromium's git repo.

Getting Started

  1. Clone the repo
  2. Go to repo root and run: npm start
    • This launches Chrome Canary and starts the dev server with 1 command
  3. Go to http://localhost:9222#custom=true&experiments=true

Power user tips:

You can customize the port for the dev server: e.g. PORT=8888 npm start.

You can also launch chrome and start the server separately:

  • npm run chrome
  • npm run server

When you start Chrome separately, you can pass extra args to Chrome:

npm run chrome -- https://news.ycombinator.com

(e.g. this launches Hacker News on startup)

If you want to reset your development profile for Chrome, pass in "--reset-profile":

npm start -- --reset-profile

OR

npm run chrome -- --reset-profile

Hacking

Useful Commands

Basic:

  • npm run format - formats your code using clang-format
  • npm test - builds devtools and runs all inspector layout tests

Note: If you're using a full chromium checkout and compiled content shell in out/Release, then npm test uses that. Otherwise, with only a front-end checkout (i.e. cloning from GitHub), then npm test will fetch a previously compiled content shell from the cloud (and cache it for future test runs).

Advanced testing:

  • npm test -- --fetch-content-shell - even if you're using a full chromium checkout and have a compiled content shell, this will fetch a pre-compiled content shell. This is useful if you haven't compiled your content shell recently.
  • npm test -- -f --child-processes=16 - pass in additional flags to the test harness
  • npm test -- inspector/sources inspector/console - run specific tests
  • npm test -- inspector/cookie-resource-match.html --debug-devtools - debug a specific test (non-bundled & minified). You can use "-d" as a shorthand for "--debug-devtools".
  • npm run test:build - only builds devtools (in debug mode)
  • npm run test:run - only runs devtools tests

Development

Getting in touch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.