rules_nodejs icon indicating copy to clipboard operation
rules_nodejs copied to clipboard

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

Open devversion opened this issue 7 years ago • 3 comments

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

devversion avatar Oct 16 '18 17:10 devversion

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!

github-actions[bot] avatar Nov 18 '20 01:11 github-actions[bot]

I believe that this is still an issue.

Splaktar avatar Nov 18 '20 01:11 Splaktar

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!

github-actions[bot] avatar Apr 27 '21 01:04 github-actions[bot]

No longer in scope for rules_nodejs

gregmagolan avatar Jun 08 '24 21:06 gregmagolan