def all(files=nil, options={})
      # if you want the default 'app.files', you can just pass in the options
      if files.is_a?(Hash) && options == {}
        options = files
        files = nil
      end

      check_platform = options.fetch(:platform, nil)
      current_platform = App.respond_to?(:template) ? App.template : :ios
      return unless Motion::Require.check_platform(current_platform, check_platform)

      Motion::Project::App.setup do |app|
        app.exclude_from_detect_dependencies << ext_file

        if files.nil? || files.empty?
          app.files.push ext_file
          app.exclude_from_detect_dependencies += app.files
          app.files_dependencies dependencies_for(app.files.flatten)
        else
        # Place files prior to those in ./app, otherwise at the end.
          preceding_app = app.files.index { |f| f =~ %r(^(?:\./)?app/) } || -1
          required = Array(files).map { |f| explicit_relative(f) }
          app.exclude_from_detect_dependencies += required
          app.files.insert(preceding_app, ext_file, *required)
          app.files.uniq! # Prevent redundancy

          app.files_dependencies dependencies_for(required)
        end
      end
    end
def all(files=nil, options={})
      # if you want the default 'app.files', you can just pass in the options
      if files.is_a?(Hash) && options == {}
        options = files
        files = nil
      end

      check_platform = options.fetch(:platform, nil)
      current_platform = App.respond_to?(:template) ? App.template : :ios
      return unless Motion::Require.check_platform(current_platform, check_platform)

      Motion::Project::App.setup do |app|
        app.exclude_from_detect_dependencies << ext_file

        if files.nil? || files.empty?
          app.files.push ext_file
          app.exclude_from_detect_dependencies += app.files
          app.files_dependencies dependencies_for(app.files.flatten)
        else
        # Place files prior to those in ./app, otherwise at the end.
          preceding_app = app.files.index { |f| f =~ %r(^(?:\./)?app/) } || -1
          required = Array(files).map { |f| explicit_relative(f) }
          app.exclude_from_detect_dependencies += required
          app.files.insert(preceding_app, ext_file, *required)
          app.files.uniq! # Prevent redundancy

          app.files_dependencies dependencies_for(required)
        end
      end
    end
Scan specified files. When nil, fallback to RubyMotion's default (app/**/*.rb).