diff options
author | Gleb Mazovetskiy <glex.spb@gmail.com> | 2020-08-09 11:09:29 +0300 |
---|---|---|
committer | Gleb Mazovetskiy <glex.spb@gmail.com> | 2020-08-09 11:09:29 +0300 |
commit | 43f87174d8d3a9b473c12fd807511b46bf7b4bd4 (patch) | |
tree | b0d135173f2a7c0cf78c905bc17d321b0e70e609 | |
parent | ca9e27946b00f0600ed3ca346e09ca0bb7e12899 (diff) |
updater/js.rb: Update paths for v5
-rw-r--r-- | tasks/updater/js.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tasks/updater/js.rb b/tasks/updater/js.rb index 0542629..fbcb466 100644 --- a/tasks/updater/js.rb +++ b/tasks/updater/js.rb @@ -29,13 +29,13 @@ class Updater def bootstrap_js_files @bootstrap_js_files ||= begin - src_files = get_paths_by_type('js/src', /\.js$/) - %w[index.js tools/sanitizer.js] + src_files = get_paths_by_type('js/src', /\.js$/) - %w[util/index.js util/sanitizer.js] imports = Deps.new # Get the imports from the ES6 files to order requires correctly. read_files('js/src', src_files).each do |name, content| imports.add name, - *content.scan(%r{import [a-zA-Z]* from '\./(\w+)}) - .flatten(1).map { |f| "#{f}.js" } + *content.scan(%r{import [a-zA-Z]* from '\./([\w/-]+)}) + .flatten(1).map { |f| "#{f}.js" }.uniq end imports.tsort end |