|
20 | 20 | // we can't add css/js the usual way, because some browsers (FF) eagerly prefetch resources
|
21 | 21 | // before the base attribute is added, causing 404 and terribly slow loading of the docs app.
|
22 | 22 | (function() {
|
| 23 | + if (window.name.indexOf('NG_DEFER_BOOTSTRAP!') == 0) { |
| 24 | + //TODO(i): super ugly hack to temporarily speed up our e2e tests until we move to protractor + extracted examples |
| 25 | + window.RUNNING_IN_NG_TEST_RUNNER = true; |
| 26 | + } |
| 27 | + |
23 | 28 | var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
|
24 | 29 | rUrl = /(#!\/|api|guide|misc|tutorial|cookbook|error|index[^\.]*\.html).*$/,
|
25 | 30 | baseUrl = location.href.replace(rUrl, indexFile),
|
|
50 | 55 | addTag('script', {src: 'components/angular-bootstrap.js' }, sync);
|
51 | 56 | addTag('script', {src: 'components/angular-bootstrap-prettify.js' }, sync);
|
52 | 57 | addTag('script', {src: 'components/google-code-prettify.js' }, sync);
|
53 |
| - addTag('script', {src: 'components/' + (debug ? 'lunr.js' : 'lunr.min.js') }, sync); |
| 58 | + if (!window.RUNNING_IN_NG_TEST_RUNNER) { |
| 59 | + addTag('script', {src: 'components/' + (debug ? 'lunr.js' : 'lunr.min.js') }, sync); |
| 60 | + } |
54 | 61 | addTag('script', {src: 'components/marked.js' }, sync);
|
55 | 62 | addTag('script', {src: 'docs-data.js'}, sync);
|
56 | 63 | addTag('script', {src: 'js/docs.js'}, sync);
|
|
0 commit comments