(function() { <% voxels_dir_path = Rails.root.join( 'app', 'assets', 'javascripts', 'voxels' ) @voxels = Dir.entries(voxels_dir_path).reject { |entry| entry.match(/\./) } if Dir.exists?(voxels_dir_path) @voxels ||= [] %> var statics = [ 'ngAnimate', 'ngAria', 'ngMessages', 'ngMaterial', 'ui.router', 'Navigation' ]; var dynamics = <%=raw @voxels %>; var dependencies = statics.concat(dynamics); // start voxality module with all sub module window.voxality = angular.module('voxality', dependencies); }).call(this);