| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @license | 
					
						
							|  |  |  |  * Copyright Google Inc. All Rights Reserved. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  |  * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-30 10:55:45 -07:00
										 |  |  | const commonjs = require('rollup-plugin-commonjs'); | 
					
						
							|  |  |  | const sourcemaps = require('rollup-plugin-sourcemaps'); | 
					
						
							|  |  |  | const path = require('path'); | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | var m = /^\@angular\/((\w|\-)+)(\/(\w|\d|\/|\-)+)?$/; | 
					
						
							| 
									
										
										
										
											2017-03-06 16:51:03 -08:00
										 |  |  | var location = normalize('../../dist/packages-dist') + '/'; | 
					
						
							|  |  |  | var rxjsLocation = normalize('../../node_modules/rxjs'); | 
					
						
							| 
									
										
										
										
											2017-06-19 11:12:48 -07:00
										 |  |  | var tslibLocation = normalize('../../node_modules/tslib'); | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | var esm = 'esm/'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-20 09:54:47 -07:00
										 |  |  | var locations = {'compiler-cli': normalize('../../dist/packages') + '/'}; | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | var esm_suffixes = {}; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function normalize(fileName) { | 
					
						
							|  |  |  |   return path.resolve(__dirname, fileName); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | function resolve(id, from) { | 
					
						
							|  |  |  |   // console.log('Resolve id:', id, 'from', from)
 | 
					
						
							|  |  |  |   var match = m.exec(id); | 
					
						
							|  |  |  |   if (match) { | 
					
						
							|  |  |  |     var packageName = match[1]; | 
					
						
							|  |  |  |     var esm_suffix = esm_suffixes[packageName] || ''; | 
					
						
							|  |  |  |     var loc = locations[packageName] || location; | 
					
						
							| 
									
										
										
										
											2017-03-07 11:04:30 -08:00
										 |  |  |     var r = loc !== location && (loc + esm_suffix + packageName + (match[3] || '/index') + '.js') || | 
					
						
							| 
									
										
										
										
											2018-03-15 14:13:13 -07:00
										 |  |  |         loc + packageName + '/fesm5/' + packageName + '.js'; | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  |     return r; | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   if (id && id.startsWith('rxjs/')) { | 
					
						
							|  |  |  |     const resolved = `${rxjsLocation}${id.replace('rxjs', '')}.js`; | 
					
						
							|  |  |  |     return resolved; | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2017-06-19 11:12:48 -07:00
										 |  |  |   if (id == 'tslib') { | 
					
						
							|  |  |  |     return tslibLocation + '/tslib.es6.js'; | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | var banner = `
 | 
					
						
							| 
									
										
										
										
											2017-03-29 09:34:21 -07:00
										 |  |  | var $reflect = {defineMetadata: function() {}, getOwnMetadata: function(){}}; | 
					
						
							|  |  |  | ((typeof global !== 'undefined' && global)||{})['Reflect'] = $reflect; | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  | var $deferred, $resolved, $provided; | 
					
						
							|  |  |  | function $getModule(name) { return $provided[name] || require(name); } | 
					
						
							|  |  |  | function define(modules, cb) { $deferred = { modules: modules, cb: cb }; } | 
					
						
							|  |  |  | module.exports = function(provided) { | 
					
						
							|  |  |  |   if ($resolved) return $resolved; | 
					
						
							|  |  |  |   var result = {}; | 
					
						
							| 
									
										
										
										
											2017-03-29 09:34:21 -07:00
										 |  |  |   $provided = Object.assign({'reflect-metadata': $reflect}, provided || {}, { exports: result }); | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  |   $deferred.cb.apply(this, $deferred.modules.map($getModule)); | 
					
						
							|  |  |  |   $resolved = result; | 
					
						
							|  |  |  |   return result; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | `;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-30 10:55:45 -07:00
										 |  |  | module.exports = { | 
					
						
							| 
									
										
										
										
											2018-03-15 14:13:13 -07:00
										 |  |  |   entry: '../../dist/packages-dist/language-service/fesm5/language-service.js', | 
					
						
							| 
									
										
										
										
											2017-03-06 16:51:03 -08:00
										 |  |  |   dest: '../../dist/packages-dist/language-service/bundles/language-service.umd.js', | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  |   format: 'amd', | 
					
						
							| 
									
										
										
										
											2017-09-28 09:29:22 -07:00
										 |  |  |   amd: { | 
					
						
							|  |  |  |       // Don't name this module, causes
 | 
					
						
							|  |  |  |       // Loading the language service caused the following exception: TypeError:
 | 
					
						
							|  |  |  |       // $deferred.modules.map is not a function
 | 
					
						
							|  |  |  |       // id: '@angular/language-service'
 | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2017-02-23 22:53:17 -08:00
										 |  |  |   moduleName: 'ng.language_service', | 
					
						
							|  |  |  |   exports: 'named', | 
					
						
							|  |  |  |   external: [ | 
					
						
							|  |  |  |     'fs', | 
					
						
							|  |  |  |     'path', | 
					
						
							|  |  |  |     'typescript', | 
					
						
							|  |  |  |   ], | 
					
						
							|  |  |  |   globals: { | 
					
						
							|  |  |  |     'typescript': 'ts', | 
					
						
							|  |  |  |     'path': 'path', | 
					
						
							|  |  |  |     'fs': 'fs', | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   banner: banner, | 
					
						
							| 
									
										
										
										
											2017-08-02 19:15:30 -07:00
										 |  |  |   plugins: [{resolveId: resolve}, commonjs(), sourcemaps()] | 
					
						
							| 
									
										
										
										
											2017-09-22 19:51:03 +02:00
										 |  |  | }; |