W503 line break before binary operator
Looking at the code base, it sounds okay to follow this check.
Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
In some deployment environment, the JS source files need to be listed
in consistent order so that they will have the same cache key value for
the compressed JS file.
Change-Id: Ib187a85b7a1fca03c0eb78b411cf121017d40890
Closes-Bug: #1476383
This patch creates horizon.utils.file-discovery module which provides
functionalities for automatic file-discovery. With these infrastructural
helpers, we can build JavaScript and HTML file auto-discovery for horizon
align with th existing plug-in mechanism.
1) discover_files(base_path, sub_path='', ext='', trim_base_path=False):
Discover all files with certain extension in given paths
2) sort_js_files(js_files):
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 files that defines 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.
3) discover_static_files(base_path, sub_path=''):
Discover static files in given paths, returns JavaScript sources,
mocks, specs and HTML templates files grouped in lists.
Partially-Implements: blueprint auto-js-file-finding
Change-Id: Idd0b69451f81b2f740b10515e3e274d48b681dbe