当前位置: 首页>>代码示例>>Python>>正文


Python node_resolve.NodeResolve类代码示例

本文整理汇总了Python中pants.contrib.node.tasks.node_resolve.NodeResolve的典型用法代码示例。如果您正苦于以下问题:Python NodeResolve类的具体用法?Python NodeResolve怎么用?Python NodeResolve使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了NodeResolve类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: register_goals

def register_goals():
  NodeResolve.register_resolver_for_type(ScalaJSBinary, ScalaJSPlatform)
  # NB: These task/goal assignments are pretty nuts, but are necessary in order to
  # prevent product-graph cycles between the JVM and node.js.
  #   see https://github.com/pantsbuild/pants/labels/engine
  task(name='scala-js-compile', action=ScalaJSZincCompile).install('resolve')
  task(name='scala-js-link', action=ScalaJSLink).install('resolve')
开发者ID:cosmicexplorer,项目名称:pants,代码行数:7,代码来源:register.py

示例2: test_register_resolver_for_type

    def test_register_resolver_for_type(self):
        NodeResolve._clear_resolvers()

        self.assertIsNone(NodeResolve._resolver_for_target(NodePreinstalledModule))
        self.assertIsNone(NodeResolve._resolver_for_target(NodeModule))

        node_preinstalled__module_target = self.make_target(
            spec=":empty_fake_node_preinstalled_module_target", target_type=NodePreinstalledModule
        )
        NodeResolve.register_resolver_for_type(NodePreinstalledModule, NodePreinstalledModuleResolver)
        self.assertEqual(
            NodePreinstalledModuleResolver, NodeResolve._resolver_for_target(node_preinstalled__module_target)
        )

        node_module_target = self.make_target(spec=":empty_fake_node_module_target", target_type=NodeModule)
        NodeResolve.register_resolver_for_type(NodeModule, NpmResolver)
        self.assertEqual(NpmResolver, NodeResolve._resolver_for_target(node_module_target))
开发者ID:RobinTec,项目名称:pants,代码行数:17,代码来源:test_node_resolve.py

示例3: register_options

  def register_options(cls, register):
    super(NpmResolver, cls).register_options(register)
    register(
      '--install-optional', type=bool, default=False, fingerprint=True,
      help='If enabled, install optional dependencies.')
    register(
      '--install-production', type=bool, default=False, fingerprint=True,
      help='If enabled, do not install devDependencies.')
    register(
      '--force', type=bool, default=False, fingerprint=True,
      help='If enabled, refetch and resolve dependencies even if they are already built.')
    register(
      '--frozen-lockfile', type=bool, default=True, fingerprint=True,
      help='If enabled, disallow automatic update of lock files.')
    # There are cases where passed through options does not override hard-coded options.
    # One example is for node-install, --frozen-lockfile=False is the dominate configuration
    # as it allows the user to modify dependencies and generate a new lockfile.
    # By turning on --force-option-override, the user accepts full responsibilities.
    register(
      '--force-option-override', type=bool, default=False, fingerprint=True, advanced=True,
      help='If enabled, options will override hard-coded values. Be aware of default values.')

    NodeResolve.register_resolver_for_type(NodeModule, cls)
开发者ID:cosmicexplorer,项目名称:pants,代码行数:23,代码来源:npm_resolver.py

示例4: tearDown

 def tearDown(self):
   super(NodeTestTest, self).tearDown()
   NodeResolve._clear_resolvers()
开发者ID:CaitieM20,项目名称:pants,代码行数:3,代码来源:test_node_test.py

示例5: setUp

 def setUp(self):
   super(NodeTestTest, self).setUp()
   NodeResolve.register_resolver_for_type(NodeModule, NpmResolver)
开发者ID:CaitieM20,项目名称:pants,代码行数:3,代码来源:test_node_test.py

示例6: register_options

 def register_options(cls, register):
   super(NodePreinstalledModuleResolver, cls).register_options(register)
   NodeResolve.register_resolver_for_type(NodePreinstalledModule, cls)
开发者ID:Gointer,项目名称:pants,代码行数:3,代码来源:node_preinstalled_module_resolver.py

示例7: tearDown

 def tearDown(self):
   super(NodeResolveSourceDepsTest, self).tearDown()
   NodeResolve._clear_resolvers()
开发者ID:cosmicexplorer,项目名称:pants,代码行数:3,代码来源:test_node_resolve_src_deps.py

示例8: setUp

 def setUp(self):
   super(NodeResolveSourceDepsTest, self).setUp()
   NodeResolve.register_resolver_for_type(NodePreinstalledModule, NodePreinstalledModuleResolver)
   NodeResolve.register_resolver_for_type(NodeModule, NpmResolver)
开发者ID:cosmicexplorer,项目名称:pants,代码行数:4,代码来源:test_node_resolve_src_deps.py

示例9: register_options

 def register_options(cls, register):
   super(NpmResolver, cls).register_options(register)
   register(
     '--install-optional', type=bool, default=False, fingerprint=True,
     help='If enabled, install optional dependencies.')
   NodeResolve.register_resolver_for_type(NodeModule, cls)
开发者ID:baroquebobcat,项目名称:pants,代码行数:6,代码来源:npm_resolver.py

示例10: register_options

 def register_options(cls, register):
   register('--fetch-timeout-secs', type=int, advanced=True, default=10,
            help='Timeout the fetch if the connection is idle for longer than this value.')
   super(NodePreinstalledModuleResolver, cls).register_options(register)
   NodeResolve.register_resolver_for_type(NodePreinstalledModule, cls)
开发者ID:cosmicexplorer,项目名称:pants,代码行数:5,代码来源:node_preinstalled_module_resolver.py

示例11: register_options

 def register_options(cls, register):
   super(NpmResolver, cls).register_options(register)
   NodeResolve.register_resolver_for_type(NodeModule, cls)
开发者ID:JieGhost,项目名称:pants,代码行数:3,代码来源:npm_resolver.py

示例12: test_product_types

 def test_product_types(self):
   self.assertEqual([NodePaths], NodeResolve.product_types())
开发者ID:traviscrawford,项目名称:pants,代码行数:2,代码来源:test_node_resolve.py

示例13: register_options

 def register_options(cls, register):
   NodeResolve.register_resolver_for_type(WebPackModule, cls)
   NodeResolve.register_resolver_for_type(NpmResource, cls)
   super(WebPackResolver, cls).register_options(register)
开发者ID:mateor,项目名称:fsqio,代码行数:4,代码来源:webpack_resolver.py


注:本文中的pants.contrib.node.tasks.node_resolve.NodeResolve类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。