No announcement yet.

[CLOSED] Output a top-level Javascript file instead of html

  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] Output a top-level Javascript file instead of html

    I prefer to use the option "outputBy": "ClassPath" which allows me to quickly navigate to any generated Javascript when something unexpected occurs. However, when not compiling to a single file (using "outputBy": "Project"), it becomes tedious to embed the generated Javascript into a project without listing every single file in dependency order.

    Currently, the only option is to auto-generate an html file that lists the dependencies for you. While this is helpful in some scenarios, there are many times when you would want to have a custom HTML file or none at all (NodeJS for instance).

    It would be great to see a feature that would generate a simple JS file (instead of HTML file) that included all of the modules in order automatically. Then, this single file could be included in any context with a single script tag or import.

    As a current workaround, I am considering parsing the generated HTML file for its `<script>` tags and importing them in a loop, which would still end up being less work than managing an explicit dependency order.

    I think better yet, it would be more robust to have a plain json file output instead. This way, it could be consumed from nearly any context.


        "output": [
    This json file could also be a place where Bridge.NET outputs other interesting information about the build for consumption.


      Yes, that would be interesting, but then another tool would be necessary to format this to whatever the project actually needs. But again, this format would be better when you need to use the resources in a custom way, than (as it currently is) parsing the output html file. Nice suggestion, thanks!

      EDIT: Logged the feature request under #3735.
      Last edited by fabricio.murta; 2018-10-05 @ 10:31 PM. Reason: add url to github feature request entry


        Another option is to use the report config of bridge.json.