* boilerplate, gulpfile, quickstart * move ts files up to cookbooks * move rest of ts files * fix tsconfig, default build task, json file * fix js examples * fix webpack example * remove a2docs.css references * fix aot examples * fix webpack run task * fix cb-i18n * fix upgrade examples * fix unit tests * fix comment in deployment index * removed unused typings.json * fix plunkers * fix js example paths * fix ts quickstart/setup prose * add src folder note to setup * broadly replace app/ -> src/app/ * broadly replace main.ts * broadly replaced index.html * broadly replace tsconfig * replace systemjs * fix filetrees * Minor prose fixes to aot, i18n cookbooks * remove char harp was complaining about * update new reactive forms example * fix quickstart jade error * fix mistakes uncovered by CI * fix bad filename errors * edit style guide 04-06 rule to use src * add changelog * Incorporate Jesus's feedback * fix snippet headers in toh1/2 * chore: tweak changelog and setup text
		
			
				
	
	
		
			99 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			3.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // #docregion
 | |
| module.exports = function(config) {
 | |
| 
 | |
|   var appBase    = 'src/';       // transpiled app JS and map files
 | |
|   var appAssets  = '/base/app/'; // component assets fetched by Angular's compiler
 | |
| 
 | |
|   // Testing helpers (optional) are conventionally in a folder called `testing`
 | |
|   var testingBase    = 'src/testing/'; // transpiled test JS and map files
 | |
|   var testingSrcBase = 'src/testing/'; // test source TS files
 | |
| 
 | |
|   config.set({
 | |
|     basePath: '',
 | |
|     frameworks: ['jasmine'],
 | |
| 
 | |
|     plugins: [
 | |
|       require('karma-jasmine'),
 | |
|       require('karma-chrome-launcher'),
 | |
|       require('karma-jasmine-html-reporter')
 | |
|     ],
 | |
| 
 | |
|     client: {
 | |
|       builtPaths: [appBase, testingBase], // add more spec base paths as needed
 | |
|       clearContext: false // leave Jasmine Spec Runner output visible in browser
 | |
|     },
 | |
| 
 | |
|     customLaunchers: {
 | |
|       // From the CLI. Not used here but interesting
 | |
|       // chrome setup for travis CI using chromium
 | |
|       Chrome_travis_ci: {
 | |
|         base: 'Chrome',
 | |
|         flags: ['--no-sandbox']
 | |
|       }
 | |
|     },
 | |
| 
 | |
|     files: [
 | |
|       // System.js for module loading
 | |
|       'node_modules/systemjs/dist/system.src.js',
 | |
| 
 | |
|       // Polyfills
 | |
|       'node_modules/core-js/client/shim.js',
 | |
| 
 | |
|       // zone.js
 | |
|       'node_modules/zone.js/dist/zone.js',
 | |
|       'node_modules/zone.js/dist/long-stack-trace-zone.js',
 | |
|       'node_modules/zone.js/dist/proxy.js',
 | |
|       'node_modules/zone.js/dist/sync-test.js',
 | |
|       'node_modules/zone.js/dist/jasmine-patch.js',
 | |
|       'node_modules/zone.js/dist/async-test.js',
 | |
|       'node_modules/zone.js/dist/fake-async-test.js',
 | |
| 
 | |
|       // RxJs
 | |
|       { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false },
 | |
|       { pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false },
 | |
| 
 | |
|       // Paths loaded via module imports:
 | |
|       // Angular itself
 | |
|       { pattern: 'node_modules/@angular/**/*.js', included: false, watched: false },
 | |
|       { pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false },
 | |
| 
 | |
|       { pattern: appBase + '/systemjs.config.js', included: false, watched: false },
 | |
|       { pattern: appBase + '/systemjs.config.extras.js', included: false, watched: false },
 | |
|       'karma-test-shim.js', // optionally extend SystemJS mapping e.g., with barrels
 | |
| 
 | |
|       // transpiled application & spec code paths loaded via module imports
 | |
|       { pattern: appBase + '**/*.js', included: false, watched: true },
 | |
|       { pattern: testingBase + '**/*.js', included: false, watched: true },
 | |
| 
 | |
| 
 | |
|       // Asset (HTML & CSS) paths loaded via Angular's component compiler
 | |
|       // (these paths need to be rewritten, see proxies section)
 | |
|       { pattern: appBase + '**/*.html', included: false, watched: true },
 | |
|       { pattern: appBase + '**/*.css', included: false, watched: true },
 | |
| 
 | |
|       // Paths for debugging with source maps in dev tools
 | |
|       { pattern: appBase + '**/*.ts', included: false, watched: false },
 | |
|       { pattern: appBase + '**/*.js.map', included: false, watched: false },
 | |
|       { pattern: testingSrcBase + '**/*.ts', included: false, watched: false },
 | |
|       { pattern: testingBase + '**/*.js.map', included: false, watched: false}
 | |
|     ],
 | |
| 
 | |
|     // Proxied base paths for loading assets
 | |
|     proxies: {
 | |
|       // required for modules fetched by SystemJS
 | |
|       '/base/src/node_modules/': '/base/node_modules/'
 | |
|     },
 | |
| 
 | |
|     exclude: [],
 | |
|     preprocessors: {},
 | |
|     reporters: ['progress', 'kjhtml'],
 | |
| 
 | |
|     port: 9876,
 | |
|     colors: true,
 | |
|     logLevel: config.LOG_INFO,
 | |
|     autoWatch: true,
 | |
|     browsers: ['Chrome'],
 | |
|     singleRun: false
 | |
|   })
 | |
| }
 |