public function addModule($name, $location, $replace = false)
    {
        if ($name == '') {
            throw new exception\InvalidArgumentException('The require.js module name must not be empty');
        }

        if ($replace || !isset($this->modules[$name])) {
            $this->modules[$name] = (string)$location;
        }

        return $this;
    }