module Sprockets::Paths

def append_path(path)

Paths at the beginning of the `Array` have a higher priority.

Append a `path` to the `paths` list.
def append_path(path)
  mutate_config(:paths) do |paths|
    path = File.expand_path(path, root).dup.freeze
    paths.push(path)
  end
end

def clear_paths

you want.
completely wipe the paths list and reappend them in the order
There is no mechanism for reordering paths, so its best to

Clear all paths and start fresh.
def clear_paths
  mutate_config(:paths) do |paths|
    paths.clear
  end
end

def prepend_path(path)

Paths at the end of the `Array` have the least priority.

Prepend a `path` to the `paths` list.
def prepend_path(path)
  mutate_config(:paths) do |paths|
    path = File.expand_path(path, root).dup.freeze
    paths.unshift(path)
  end
end