Code Monkey home page Code Monkey logo

ember-debug's People

Contributors

chancancode avatar syu15 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

syu15 isabella232

ember-debug's Issues

API to allow addons to hook into `$edb`

This is more of an open-ended question/discussion as opposed to a concrete item.

In my opinion, it would be great if the developer could trust that they could access all debugging methods including ones provided by addons via $edb so that they could do something like this (pseudocode for ember concurrency as an example):
$edb.listTasks.

Would love to hear other thoughts on this, however.

Get Routable EngineInstance

$edb.getEngineInstanceForRoute('some.mount.point') => Promise<EngineInstance>
class EDB {
  async getEngineInstanceForRoute(mountPoint: string): Promise<EngineInstance> {
    const router = this.owner.lookup('router:main');
    const engineApplicationRoute = await router._routerMicrolib.getRoute(mountPoint)
    const engineInstance = getOwner(engineApplicationRoute);
    return engineInstance;
  }
}

Why is webpack processing the `.tsbuildinfo` files?

~/C/ember-debug ❯❯❯ yarn build
yarn run v1.22.4
$ yarn build:webpack
$ webpack -p
Hash: 760f366086dcd1d35a3b
Version: webpack 4.43.0
Time: 6079ms
Built at: 11/02/2020 6:58:53 PM
                                             Asset       Size  Chunks                    Chunk Names
    ../packages/ember-debug-global/dist/index.d.ts   46 bytes          [emitted]
../packages/ember-debug-global/dist/index.d.ts.map  104 bytes          [emitted]
      ../packages/ember-debug-global/dist/index.js  908 bytes          [emitted]
  ../packages/ember-debug-global/dist/index.js.map  864 bytes          [emitted]
   ../packages/ember-debug-global/tmp/.tsbuildinfo    292 KiB          [emitted]  [big]
           ../packages/ember-debug/dist/index.d.ts  323 bytes          [emitted]
       ../packages/ember-debug/dist/index.d.ts.map  371 bytes          [emitted]
             ../packages/ember-debug/dist/index.js  417 bytes          [emitted]
         ../packages/ember-debug/dist/index.js.map  505 bytes          [emitted]
          ../packages/ember-debug/tmp/.tsbuildinfo    291 KiB          [emitted]  [big]
                                    bookmarklet.js   12.2 KiB       0  [emitted]         main
                                        index.html   1.02 KiB          [emitted]
Entrypoint main = bookmarklet.js
[2] ./bookmarklet.ts 72 bytes {0} [built]
[3] ./packages/ember-debug-global/dist/index.js + 1 modules 1.59 KiB {0} [built]
    | ./packages/ember-debug-global/dist/index.js 775 bytes [built]
    | ./packages/ember-debug/dist/index.js 847 bytes [built]
    + 2 hidden modules

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  ../packages/ember-debug/tmp/.tsbuildinfo (291 KiB)
  ../packages/ember-debug-global/tmp/.tsbuildinfo (292 KiB)

WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
Child HtmlWebpackCompiler:
     1 asset
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    [0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 1.38 KiB {0} [built]
✨  Done in 8.00s.

Not sure if this has always been the case or it was something we did "recently". Webpack is complaining that some of the "asset" files are too big, and it turns out it was talking about the .tsbuildinfo files. These are basically internal caches used by TypeScript, and I'm not sure why Webpack would need to process them at all. I think something is probably misconfigured somewhere, or maybe the warning is just wrong/superfluous... needs investigation.

Detect whether or not URL is recognized by router

A function that does this:

  1. Check whether or not a URL has the same domain as the Ember application (insert regex/window code here)
  2. If so, then get the relative pathname and check to see if it is recognized by the router router.recognize(urlPath) and return a boolean accordingly (return value can be up for debate imo)

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.