Example #1
0
 def run_command(self, args=None, node_paths=None):
     """Returns a command that when executed will run an arbitrary command via package
     manager."""
     return command_gen(self.tool_installations,
                        self.name,
                        args=args,
                        node_paths=node_paths)
Example #2
0
 def run_command(self, args=None, node_paths=None):
   """Returns a command that when executed will run an arbitury command via package manager."""
   return command_gen(
     self.tool_installations,
     self.name,
     args=args,
     node_paths=node_paths
   )
Example #3
0
    def node_command(self, args=None, node_paths=None):
        """Creates a command that can run `node`, passing the given args to it.

        :param list args: An optional list of arguments to pass to `node`.
        :param list node_paths: An optional list of paths to node_modules.
        :returns: A `node` command that can be run later.
        :rtype: :class:`NodeDistribution.Command`
        """
        # NB: We explicitly allow no args for the `node` command unlike the `npm` command since running
        # `node` with no arguments is useful, it launches a REPL.
        return command_gen([self._install_node], "node", args=args, node_paths=node_paths)
  def node_command(self, args=None, node_paths=None):
    """Creates a command that can run `node`, passing the given args to it.

    :param list args: An optional list of arguments to pass to `node`.
    :param list node_paths: An optional list of paths to node_modules.
    :returns: A `node` command that can be run later.
    :rtype: :class:`NodeDistribution.Command`
    """
    # NB: We explicitly allow no args for the `node` command unlike the `npm` command since running
    # `node` with no arguments is useful, it launches a REPL.
    return command_gen([self._install_node], 'node', args=args, node_paths=node_paths)