如何指定Closure Compiler在导入JavaScript模块时应搜索的目录:
<Grid Grid.Row="1">
<TabControl x:Name="MainBoard" Style="{DynamicResource BaseTabControlStyle}" TabStripPlacement="Top" HorizontalContentAlignment="Center">
<TabItem x:Name="Channels" Header="CHANNELS" Style="{DynamicResource BaseTabItemStyle}" Background="{x:Null}" FontFamily="Bebas Neue Book" Margin="0" Height="30" Width="100" VerticalAlignment="Top" d:LayoutOverrides="Height">
<Grid x:Name="ChannelsContent" Margin="4, 4, 4, 4" DockPanel.Dock="Left">
<TabControl x:Name="ContentSelector" Style="{DynamicResource BaseTabControlStyle}" TabStripPlacement="Right" HorizontalContentAlignment="Center">
<TabItem x:Name="Channel0" IsSelected="True" Header="1" Style="{DynamicResource BaseTabItemStyle}" Height="45" Width="25" Background="{x:Null}" FontFamily="Bebas Neue Book">
<CMiX:ChannelControls Tag="0" VidTranslateNames="{Binding VideoTranslateNames, ElementName=cmix, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
</TabItem>
</TabControl>
</Grid>
</TabItem>
</TabControl>
</Grid>
答案 0 :(得分:3)
Closure-compiler不会&#34;#34;搜索&#34;对于模块。您必须通过jasmine.Ajax.stubRequest(myUrl).andReturn({
...
"responseTest": "response #2"
});
setUpAndSendAjaxCall2();
expect(onreadystatechangeCallback2).toHaveBeenCalledWith("response #2");
标志或gulp / grunt插件的源文件方法传递相应的源文件。 Closure-compiler确实解析了相对路径模块 - 但它们将从源文件导入位置解析。编译器当前不解析node_modules文件夹中的导入。