build(aio): refactor dgeni packages

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.
This commit is contained in:
Peter Bacon Darwin
2017-04-21 13:10:52 +01:00
committed by Pete Bacon Darwin
parent 7a8bd99ab1
commit 3cad5da5a4
66 changed files with 480 additions and 634 deletions

View File

@ -9,9 +9,10 @@
/* eslint no-console: "off" */
const Package = require('dgeni').Package;
const { basePackage, CONTENTS_PATH } = require('./base-package');
const contentPackage = require('../angular-content-package');
const { readFileSync } = require('fs');
const { resolve } = require('canonical-path');
const { CONTENTS_PATH } = require('../config');
function createPackage(guideName) {
@ -25,7 +26,7 @@ function createPackage(guideName) {
console.log(examples.map(example => ' - ' + example).join('\n'));
}
return new Package('author-guide', [basePackage])
return new Package('author-guide', [contentPackage])
.config(function(readFilesProcessor) {
readFilesProcessor.sourceFiles = [
{
@ -42,5 +43,4 @@ function createPackage(guideName) {
});
}
module.exports = { createPackage };