This is to tidy up the `author-packagse`, which currently duplicates a lot of the configuration in the main packages. We need to DRY this up so that we don't fall foul of a change in one being missed in the other.
		
			
				
	
	
		
			42 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/**
 | 
						|
 * @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
 | 
						|
 */
 | 
						|
const Package = require('dgeni').Package;
 | 
						|
const contentPackage = require('../angular-content-package');
 | 
						|
const { CONTENTS_PATH } = require('../config');
 | 
						|
 | 
						|
function createPackage() {
 | 
						|
  return new Package('author-marketing', [contentPackage])
 | 
						|
    .config(function(readFilesProcessor) {
 | 
						|
      readFilesProcessor.sourceFiles = [
 | 
						|
        {
 | 
						|
          basePath: CONTENTS_PATH + '/marketing',
 | 
						|
          include: CONTENTS_PATH + '/marketing/**/*.{html,md}',
 | 
						|
          fileReader: 'contentFileReader'
 | 
						|
        },
 | 
						|
        {
 | 
						|
          basePath: CONTENTS_PATH,
 | 
						|
          include: CONTENTS_PATH + '/*.md',
 | 
						|
          exclude: [CONTENTS_PATH + '/index.md'],
 | 
						|
          fileReader: 'contentFileReader'
 | 
						|
        },
 | 
						|
        {
 | 
						|
          basePath: CONTENTS_PATH,
 | 
						|
          include: CONTENTS_PATH + '/marketing/*.json',
 | 
						|
          fileReader: 'jsonFileReader'
 | 
						|
        },
 | 
						|
        {
 | 
						|
          basePath: CONTENTS_PATH,
 | 
						|
          include: CONTENTS_PATH + '/navigation.json',
 | 
						|
          fileReader: 'jsonFileReader'
 | 
						|
        },
 | 
						|
      ];
 | 
						|
    });
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
module.exports = { createPackage }; |