bazel-contrib / rules_nodejs

NodeJS toolchain for Bazel.
https://bazelbuild.github.io/rules_nodejs/
Apache License 2.0
728 stars 522 forks source link

Option to serve and include non-js files w/ ts_web_test_rule #858

Closed devversion closed 4 months ago

devversion commented 6 years ago

Currently the ts_web_test_rule uses an internal Karma configuration that only includes files which have been templated with TMPL_bootstrap_files and TMPL_user_files.

This means that there is no way for developers to specify Non-JS files which should be included by Karma. This is because:

        "srcs": attr.label_list(
            doc = "JavaScript source files",
            allow_files = [".js"],       // Locks `TMPL_user_files` to JS only
        ),  

        "bootstrap": attr.label_list(
            allow_files = [".js"],      // Locks `TMPL_bootstrap_files` to JS only
        ),

There should be some way for people to include a CSS file through the rule configuration. This is necessary because some test suites depend on external CSS that needs to be served and included.

Included means that Karma automatically creates a <link rel="stylesheet" for such assets. Meaning that those are available without additional logic for loading them through JavaScript.

See here: https://github.com/karma-runner/karma/blob/c311ac00cef4a957f889ed613238793c0ffa95a2/lib/middleware/karma.js#L198

cc. @alexeagle

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

Splaktar commented 3 years ago

I believe that this is still an issue.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

gregmagolan commented 4 months ago

No longer in scope for rules_nodejs