The horizon.utils.file_discovery ModuleΒΆ

horizon.utils.file_discovery.discover_files(base_path, sub_path='', ext='', trim_base_path=False)[source]

Discovers all files with certain extension in given paths.

horizon.utils.file_discovery.discover_static_files(base_path, sub_path='')[source]

Discovers static files in given paths, returning JavaScript sources, mocks, specs and HTML templates, all grouped in lists.

horizon.utils.file_discovery.populate_horizon_config(horizon_config, base_path, sub_path='', prepend=False)[source]
horizon.utils.file_discovery.sort_js_files(js_files)[source]

Sorts JavaScript files in js_files into source files, mock files and spec files based on file extension.

Output:

  • sources: source files for production. The order of source files is significant and should be listed in the below order:
    • First, all the that defines the other application’s angular module. Those files have extension of .module.js. The order among them is not significant.
    • Followed by all other source code files. The order among them is not significant.
  • mocks: mock files provide mock data/services for tests. They have extension of .mock.js. The order among them is not significant.
  • specs: spec files for testing. They have extension of .spec.js. The order among them is not significant.

Previous topic

The horizon.utils.babel_extract_angular Module

Next topic

The horizon.utils.scss_filter Module

Project Source

This Page