|
| 1 | +'use strict'; |
| 2 | +// Special deployment that is only used for the examples on plnkr. |
| 3 | +// While the embedded examples use the Angular files relative the docs folder, |
| 4 | +// plnkr uses the CDN urls, and needs to switch between Google CDN for tagged versions |
| 5 | +// and the code.angularjs.org server for the snapshot (master) version. |
| 6 | + |
| 7 | +var versionInfo = require('../../../../lib/versions/version-info'); |
| 8 | +var isSnapshot = versionInfo.currentVersion.isSnapshot; |
| 9 | + |
| 10 | +var cdnUrl = isSnapshot ? |
| 11 | + '//code.angularjs.org/snapshot' : |
| 12 | + '//ajax.googleapis.com/ajax/libs/angularjs/' + versionInfo.cdnVersion; |
| 13 | + |
| 14 | +module.exports = function plnkrDeployment(getVersion) { |
| 15 | + return { |
| 16 | + name: 'plnkr', |
| 17 | + examples: { |
| 18 | + commonFiles: { |
| 19 | + scripts: [cdnUrl + '/angular.min.js'] |
| 20 | + }, |
| 21 | + dependencyPath: cdnUrl + '/' |
| 22 | + }, |
| 23 | + scripts: [ |
| 24 | + cdnUrl + '/angular.min.js', |
| 25 | + cdnUrl + '/angular-resource.min.js', |
| 26 | + cdnUrl + '/angular-route.min.js', |
| 27 | + cdnUrl + '/angular-cookies.min.js', |
| 28 | + cdnUrl + '/angular-sanitize.min.js', |
| 29 | + cdnUrl + '/angular-touch.min.js', |
| 30 | + cdnUrl + '/angular-animate.min.js', |
| 31 | + 'components/marked-' + getVersion('marked', 'node_modules', 'package.json') + '/lib/marked.js', |
| 32 | + 'js/angular-bootstrap/dropdown-toggle.min.js', |
| 33 | + 'components/lunr.js-' + getVersion('lunr.js') + '/lunr.min.js', |
| 34 | + 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/prettify.js', |
| 35 | + 'components/google-code-prettify-' + getVersion('google-code-prettify') + '/src/lang-css.js', |
| 36 | + 'js/versions-data.js', |
| 37 | + 'js/pages-data.js', |
| 38 | + 'js/nav-data.js', |
| 39 | + 'js/docs.min.js' |
| 40 | + ], |
| 41 | + stylesheets: [ |
| 42 | + 'components/bootstrap-' + getVersion('bootstrap') + '/css/bootstrap.min.css', |
| 43 | + 'components/open-sans-fontface-' + getVersion('open-sans-fontface') + '/open-sans.css', |
| 44 | + 'css/prettify-theme.css', |
| 45 | + 'css/docs.css', |
| 46 | + 'css/animations.css' |
| 47 | + ] |
| 48 | + }; |
| 49 | +}; |
0 commit comments