@ Deprecated public static String getWebJarConfig ( Map . Entry < String , String > webJar ) { String webJarConfig = "" ; // read the webJarConfigs String filename = WebJarAssetLocator . WEBJARS_PATH_PREFIX + "/" + webJar . getKey ( ) + "/" + webJar . getValue ( ) + "/" + "webjars-requirejs.js" ; InputStream inputStream = RequireJS . class . getClassLoader ( ) . getResourceAsStream ( filename ) ; if ( inputStream != null ) { log . warn ( "The " + webJar . getKey ( ) + " " + webJar . getValue ( ) + " WebJar is using the legacy RequireJS config.\n" + "Please try a new version of the WebJar or file or file an issue at:\n" + "http://github.com/webjars/" + webJar . getKey ( ) + "/issues/new" ) ; StringBuilder webJarConfigBuilder = new StringBuilder ( "// WebJar config for " + webJar . getKey ( ) + "\n" ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; try { String line ; while ( ( line = br . readLine ( ) ) != null ) { webJarConfigBuilder . append ( line ) . append ( "\n" ) ; } webJarConfig = webJarConfigBuilder . toString ( ) ; } catch ( IOException e ) { log . warn ( filename + " could not be read." ) ; } finally { try { br . close ( ) ; } catch ( IOException e ) { // really? } } } return webJarConfig ; }
The legacy webJars - requirejs . js based RequireJS config for a WebJar .