本文整理汇总了Java中org.apache.tapestry5.ioc.annotations.Autobuild类的典型用法代码示例。如果您正苦于以下问题:Java Autobuild类的具体用法?Java Autobuild怎么用?Java Autobuild使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Autobuild类属于org.apache.tapestry5.ioc.annotations包,在下文中一共展示了Autobuild类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: provideCompilers
import org.apache.tapestry5.ioc.annotations.Autobuild; //导入依赖的package包/类
@Contribute(StreamableResourceSource.class)
public static void provideCompilers(final MappedConfiguration<String, ResourceTransformer> configuration,
final ResourceTransformerFactory factory, @Autobuild final BabelResourceTransformer babelResourceTransformer) {
// contribution ids are file extensions:
// regular module with React support
configuration.add("jsx", factory.createCompiler("text/javascript", "JSX", "JavaScript", babelResourceTransformer,
CacheMode.SINGLE_FILE));
// ES6 module with React support
configuration.add("jsxm", factory.createCompiler("text/javascript", "JSXM", "JavaScript", babelResourceTransformer,
CacheMode.SINGLE_FILE));
// ES6 module
configuration.add("jsm", factory.createCompiler("text/javascript", "JSXM", "JavaScript", babelResourceTransformer,
CacheMode.SINGLE_FILE));
}
示例2: provideCompilers
import org.apache.tapestry5.ioc.annotations.Autobuild; //导入依赖的package包/类
@Contribute(StreamableResourceSource.class)
public static void provideCompilers(final MappedConfiguration<String, ResourceTransformer> configuration,
final ResourceTransformerFactory factory, @Autobuild final TSCompiler tsCompiler) {
// contribution ids are file extensions:
configuration.add("ts",
factory.createCompiler("text/javascript", "TS", "JavaScript", tsCompiler, CacheMode.SINGLE_FILE));
}