nl_tokens: / * interface StringTransformOptions { contents : String fetcher : Fetcher filePath : String index : FetcherIndex } transform ( opts : StringTransformOptions ) = > String
pl_tokens: function transform ( opts ) { var contents = opts . contents ; var filePath = opts . filePath ; var lastScript$ ; var $ = cheerio . load ( contents ) ; if ( path . basename ( filePath ) === 'index.html' ) { lastScript$ = findLastScript ( $ ) ; if ( lastScript$ ) { lastScript$ . after ( '<script src="require.load.js"></script>' ) ; } else { $ ( 'body' ) . append ( '<script src="require.load.js"></script>' ) ; } } return $ . <mask> ( ) ; }