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


Java SymbolConstants.PRODUCTION_MODE属性代码示例

本文整理汇总了Java中org.apache.tapestry5.SymbolConstants.PRODUCTION_MODE属性的典型用法代码示例。如果您正苦于以下问题:Java SymbolConstants.PRODUCTION_MODE属性的具体用法?Java SymbolConstants.PRODUCTION_MODE怎么用?Java SymbolConstants.PRODUCTION_MODE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.tapestry5.SymbolConstants的用法示例。


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

示例1: setupJSModules

@Contribute(ModuleManager.class)
public static void setupJSModules(final MappedConfiguration<String, JavaScriptModuleConfiguration> configuration,
    @Path("classpath:de/eddyson/tapestry/react/select/react-select.js") final Resource reactSelect,
    @Path("classpath:de/eddyson/tapestry/react/select/react-select.min.js") final Resource reactSelectMin,
    @Path("classpath:de/eddyson/tapestry/react/select/react-input-autosize.js") final Resource reactInputautoSize,
    @Path("classpath:de/eddyson/tapestry/react/select/react-input-autosize.min.js") final Resource reactInputautoSizeMin,
    @Path("classpath:de/eddyson/tapestry/react/select/classnames.js") final Resource classnames,
    @Symbol(ReactSelectSymbols.CONTRIBUTE_CLASSNAMES_MODULE) final boolean contributeClassnamesModule,
    @Symbol(ReactSelectSymbols.CONTRIBUTE_REACT_INPUT_AUTOSIZE_MODULE) final boolean contributeInputAutosizeModule,
    @Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode) throws IOException {
  if (contributeClassnamesModule) {
    configuration.add("classnames", new JavaScriptModuleConfiguration(classnames));
  }
  if (contributeInputAutosizeModule) {
    configuration.add("react-input-autosize",
        new JavaScriptModuleConfiguration(productionMode ? reactInputautoSizeMin : reactInputautoSize));
  }
  configuration.add("react-select", new JavaScriptModuleConfiguration(productionMode ? reactSelectMin : reactSelect));
}
 
开发者ID:eddyson-de,项目名称:tapestry-react-select,代码行数:19,代码来源:ReactSelectModule.java

示例2: Angular2JavascriptStack

public Angular2JavascriptStack(@Symbol(SymbolConstants.PRODUCTION_MODE)
                               final boolean productionMode,
                               @Path("webjars:es6-shim:es6-shim.js") final Resource es6_shim, 
                               @Path("webjars:zone.js:$version/dist/zone.js") final Resource zoneJs,
                               @Path("webjars:reflect-metadata:$version/Reflect.js") final Resource reflectMetadata,
                               @Path("webjars:systemjs:dist/system.src.js") final Resource systemjs, 
                               @Path("webjars:rxjs:bundles/Rx.js") final Resource rx,
                               @Path("webjars:angular__core:$version/bundles/core.umd.js") final Resource angular2,	
                               final AssetSource assetSource)
{
    this.productionMode = productionMode;
    
    this.es6_shim = es6_shim; 
    this.zoneJs = zoneJs;
    this.reflectMetadata = reflectMetadata;
    this.systemjs = systemjs;
    this.rx = rx;
    this.angular2 = angular2;
    
    this.assetSource = assetSource;
  
}
 
开发者ID:ffacon,项目名称:tapestry5-angular2,代码行数:22,代码来源:Angular2JavascriptStack.java

示例3: setupJSModules

@Contribute(ModuleManager.class)
public static void setupJSModules(final MappedConfiguration<String, JavaScriptModuleConfiguration> configuration,
    final AssetSource assetSource, @Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode,
    @Symbol(ReactSymbols.REACT_ASSET_PATH) final String reactAssetPath,
    @Symbol(ReactSymbols.REACT_ASSET_PATH_PRODUCTION) final String reactAssetPathProduction,
    @Symbol(ReactSymbols.REACT_DOM_ASSET_PATH) final String reactDomAssetPath,
    @Symbol(ReactSymbols.REACT_DOM_ASSET_PATH_PRODUCTION) final String reactDomAssetPathProduction,
    @Symbol(ReactSymbols.PROP_TYPES_ASSET_PATH) final String propTypesAssetPath,
    @Symbol(ReactSymbols.PROP_TYPES_ASSET_PATH_PRODUCTION) final String propTypesAssetPathProduction) {

  configuration.add("react", new JavaScriptModuleConfiguration(
      assetSource.resourceForPath(productionMode ? reactAssetPathProduction : reactAssetPath)));
  configuration.add("react-dom", new JavaScriptModuleConfiguration(
      assetSource.resourceForPath(productionMode ? reactDomAssetPathProduction : reactDomAssetPath)));
  configuration.add("prop-types", new JavaScriptModuleConfiguration(
      assetSource.resourceForPath(productionMode ? propTypesAssetPathProduction : propTypesAssetPath)));
}
 
开发者ID:eddyson-de,项目名称:tapestry-react,代码行数:17,代码来源:ReactModule.java

示例4: setupJSModules

@Contribute(ModuleManager.class)
public static void setupJSModules(final MappedConfiguration<String, JavaScriptModuleConfiguration> configuration,
    @Path("webjars:es6-shim:es6-shim.js") final Resource es6_shim, 
    @Path("webjars:zone.js:$version/dist/zone.js") final Resource zoneJs,
    @Path("webjars:reflect-metadata:$version/Reflect.js") final Resource reflectMetadata,
    @Path("webjars:systemjs:dist/system.src.js") final Resource systemjs, 
    @Path("webjars:rxjs:bundles/Rx.js") final Resource rx,
    @Path("webjars:angular__core:$version/bundles/core.umd.js") final Resource angular2,
    @Path("webjars:angular__router:$version/bundles/router.umd.js") final Resource router,
    @Path("webjars:angular__http:$version/bundles/http.umd.js") final Resource http,
    @Path("webjars:angular__platform-browser-dynamic:$version/bundles/platform-browser-dynamic.umd.js") final Resource platformBrowserDynamicTesting,
    @Path("webjars:typescript:lib/tsc.js") final Resource tsc,
    @Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode) {

  configuration.add("es6-shim", new JavaScriptModuleConfiguration(es6_shim));
  configuration.add(A2Script.ZONE_JS.text, new JavaScriptModuleConfiguration(zoneJs));
  configuration.add(A2Script.REFLECT_METADATA.text, new JavaScriptModuleConfiguration(reflectMetadata));
  configuration.add(A2Script.SYSTEM.text, new JavaScriptModuleConfiguration(systemjs));
  configuration.add(A2Script.RX.text, new JavaScriptModuleConfiguration(rx));
  configuration.add(A2Script.A2_ANGULAR.text, new JavaScriptModuleConfiguration(angular2));
  configuration.add(A2Script.A2_ROUTER.text, new JavaScriptModuleConfiguration(router));
  configuration.add(A2Script.A2_HTTP.text, new JavaScriptModuleConfiguration(http));
  configuration.add(A2Script.A2_PLATFORM_BROWSER_DYNAMIC.text, new JavaScriptModuleConfiguration(platformBrowserDynamicTesting));
  configuration.add("tsc", new JavaScriptModuleConfiguration(tsc));
  
  
}
 
开发者ID:ffacon,项目名称:tapestry5-angular2,代码行数:27,代码来源:Angular2Module.java

示例5: addApplicationConfigModule

@Contribute(ModuleManager.class)
public static void addApplicationConfigModule(
    final MappedConfiguration<String, JavaScriptModuleConfiguration> configuration, final SymbolSource symbolSource,
    @Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode) {

  final JSONObject config = new JSONObject();

  for (String symbolName : new String[] { SymbolConstants.CONTEXT_PATH, SymbolConstants.EXECUTION_MODE,
      SymbolConstants.PRODUCTION_MODE, SymbolConstants.START_PAGE_NAME, SymbolConstants.TAPESTRY_VERSION,
      SymbolConstants.SUPPORTED_LOCALES }) {
    String value = symbolSource.valueForSymbol(symbolName);
    config.put(symbolName, value);
  }
  config.put("react-api-path", ReactAPIFilter.path);

  StringBuilder sb = new StringBuilder();
  sb.append("define(");
  sb.append(config.toString(productionMode));
  sb.append(");");
  final byte[] bytes = sb.toString().getBytes(StandardCharsets.UTF_8);

  configuration.add("eddyson/react/application-config", new JavaScriptModuleConfiguration(new VirtualResource() {

    @Override
    public InputStream openStream() throws IOException {
      return new ByteArrayInputStream(bytes);
    }

    @Override
    public String getFile() {
      return "application-config.js";
    }

    @Override
    public URL toURL() {
      return null;
    }
  }));

}
 
开发者ID:eddyson-de,项目名称:tapestry-react,代码行数:40,代码来源:ReactModule.java

示例6: BabelResourceTransformer

public BabelResourceTransformer(final BabelCompiler babelCompiler,
    @Symbol(ReactSymbols.USE_COLORED_BABEL_OUTPUT) final boolean useColoredOutput,
    @Symbol(ReactSymbols.ENABLE_STAGE_3_TRANSFORMATIONS) final boolean enableStage3Transformations,
    @Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode) {
  this.babelCompiler = babelCompiler;
  this.useColoredOutput = useColoredOutput;
  this.enableStage3Transformations = enableStage3Transformations;
  this.productionMode = productionMode;
}
 
开发者ID:eddyson-de,项目名称:tapestry-react,代码行数:9,代码来源:BabelResourceTransformer.java

示例7: DimpleStack

public DimpleStack(
		@Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode, 
		final AssetSource assetSource) {
	super();
	this.productionMode = productionMode;
	
	final Mapper<String, Asset> pathToAsset = new Mapper<String, Asset>()
       {

           public Asset map(String path)
           {
               return assetSource.getExpandedAsset(path);
           }
       };


       stylesheetStack = CollectionFactory.newList();
       
       if (productionMode) {
       	
       	javaScriptStack = F
               .flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/dimple.min.js")
           .map(pathToAsset).toList();

       } else {
       	
       	javaScriptStack = F
       			.flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/dimple.js")
           .map(pathToAsset).toList();

       }
	
}
 
开发者ID:got5,项目名称:tapestry5-d3,代码行数:33,代码来源:DimpleStack.java

示例8: D3Stack

public D3Stack(
		@Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode, 
		final AssetSource assetSource) {
	super();
	this.productionMode = productionMode;
	
	final Mapper<String, Asset> pathToAsset = new Mapper<String, Asset>()
       {

           public Asset map(String path)
           {
               return assetSource.getExpandedAsset(path);
           }
       };


       stylesheetStack = CollectionFactory.newList();
       
       if (productionMode) {
       	
       	javaScriptStack = F
               .flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/d3.min.js")
           .map(pathToAsset).toList();

       } else {
       	
       	javaScriptStack = F
       			.flow("${" + D3SymbolConstants.JQUERY_D3_ASSET_PATH +"}/d3.js")
           .map(pathToAsset).toList();

       }
	
}
 
开发者ID:got5,项目名称:tapestry5-d3,代码行数:33,代码来源:D3Stack.java

示例9: ReactAPIFilter

public ReactAPIFilter(final ApplicationStateManager applicationStateManager, final Logger logger,
    @Symbol(SymbolConstants.PRODUCTION_MODE) final boolean productionMode) {
  this.applicationStateManager = applicationStateManager;
  this.logger = logger;
  this.productionMode = productionMode;
}
 
开发者ID:eddyson-de,项目名称:tapestry-react,代码行数:6,代码来源:ReactAPIFilter.java


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