Git Product home page Git Product logo

Comments (17)

nshahan avatar nshahan commented on July 18, 2024 1

@natebosch That was it! And I didn't have to rebuild anything so no issue there. Thanks.

from angular_components_example.

nshahan avatar nshahan commented on July 18, 2024

Yeah, I can add --no-source-maps to the release options for dart2js.

from angular_components_example.

kevmoo avatar kevmoo commented on July 18, 2024

Is there a scenario where we want to debug things?

I guess we can always rebuild the exact thing locally – so maybe good to get rid of.

from angular_components_example.

chalin avatar chalin commented on July 18, 2024

I think that the deployed app should be as slim 'n trim as possible -- just like the example Hacker News PWA.

from angular_components_example.

TedSander avatar TedSander commented on July 18, 2024

I have a counter to that. Internally we actually release all the .map files, and host all the dart files when we release. We do this so that developers can debug the gallery if they want and see how things are working.

The primary goal is for this to help developers. It should have the best practices we know about, but I don't really want to put a lot of work to make it as slim n trim as possible as that is not the purpose of it. The purpose is to document/help/showcase the widgets to developers.

from angular_components_example.

kevmoo avatar kevmoo commented on July 18, 2024

from angular_components_example.

chalin avatar chalin commented on July 18, 2024

Sure, that works for me, the problem is that the *.dart files aren't being published. Shouldn't they (if you actually want to debug from sources)?

from angular_components_example.

nshahan avatar nshahan commented on July 18, 2024

@kevmoo What would be the easiest way to let the .dart files be included when I build the gh-pages branch with peanut?

from angular_components_example.

kevmoo avatar kevmoo commented on July 18, 2024

You need to tweak the build.yaml file – @natebosch understands the bits here, I think

from angular_components_example.

natebosch avatar natebosch commented on July 18, 2024

You're explicitly configuring outputs from dart2js to not get filtered. What are the outputs that you want to keep from dart2js that are not .js or .js.map? Do we need to make the configuration more expressive to let you keep some other file while dropping the sourcemap files?

If you want instead to also keep .dart files you can add

      dart_web_compilers|dart_source_cleanup:
        options:
          enabled: false

from angular_components_example.

natebosch avatar natebosch commented on July 18, 2024

Looks like you wanted to keep the dumpinfo - why do you want that in release builds? If you feel it's important you can file an issue on the build repo asking for configuration which allows you to retain dumpinfo while removing sourcemaps. We'd have to introduce a new configuration option.

from angular_components_example.

kevmoo avatar kevmoo commented on July 18, 2024

from angular_components_example.

nshahan avatar nshahan commented on July 18, 2024

Looks like you wanted to keep the dumpinfo - why do you want that in release builds? If you feel it's important you can file an issue on the build repo asking for configuration which allows you to retain dumpinfo while removing sourcemaps.

@natebosch We do want serve the source maps and original dart files too. For the gallery it is helpful even from the published release to make experimenting with the live examples easier. Probably not something that most projects would want to do though.

from angular_components_example.

natebosch avatar natebosch commented on July 18, 2024

We do want serve the source maps and original dart files too.

SG, looks like you want

      dart_web_compilers|dart_source_cleanup:
        options:
          enabled: false

from angular_components_example.

nshahan avatar nshahan commented on July 18, 2024

@natebosch I'm having some issues getting it working. I tried a slightly modified version of the options you posted:

build_web_compilers|dart2js_archive_extractor:
    release_options:
        filter_outputs: false
build_web_compilers|dart_source_cleanup:
    release_options:
        enabled: false

I'm not sure the build is invalidated when changing these options (that might need an issue filed) but after running pub run build_runner clean and then running my release build again I still don't have the .dart sources available.

from angular_components_example.

natebosch avatar natebosch commented on July 18, 2024

@nshahan do you have a PR open so I can try to repro?

from angular_components_example.

natebosch avatar natebosch commented on July 18, 2024

oh, I just realized that the dart_source_cleanup needs to be disabled globally.

global_options:
  build_web_compilers|dart_source_cleanup:
    options:
      enabled: false

from angular_components_example.

Related Issues (20)

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.