0.0.2-1 • Published 10 years ago

karma-reference v0.0.2-1

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

karma-reference

Karma plugin. LIghtweight dependencies tracking for js and coffee files via references.

Inspired by Cassette references

Installation

add 'reference' to karma config frameworks section

Add references

Specify references to other files at comments

for js:

// @reference <file1_path> <file2_path>

for coffee:

# @reference <file1_path> <file2_path>

Now your files would be loaded in sorted by reference dependencies order.

Note: this breaks watching of adding new files, because initial globs are resolved to filelist.

File paths

File path could be:

  • Relative path like @reference ../../dir/file.coffee.
  • Absolute path like @reference ~/dir/file.js which is resolved against karma config basePath.

TODO

  • Add tests
  • Parse only comments sections of files
  • Allow customize reference pattern by regexps in config
  • Resolve dirty hack of framework initialization (karma and node-di does not support async plugins now)