This commit is contained in:
Jay Traband 2015-09-17 01:53:37 -07:00
parent 834b65dca3
commit 44d066f14c
3 changed files with 10 additions and 8 deletions

View File

@ -123,7 +123,6 @@ gulp.task('git-changed-examples', ['shred-full'], function(){
gulp.task('build-api-docs', function() { gulp.task('build-api-docs', function() {
var fs = require('fs-extra');
if (!fs.existsSync('../angular')) { if (!fs.existsSync('../angular')) {
throw new Error('build-api-docs task requires the angular2 repo to be at ' + path.resolve('../angular')); throw new Error('build-api-docs task requires the angular2 repo to be at ' + path.resolve('../angular'));
} }

View File

@ -12,7 +12,8 @@ module.exports = new Package('angular.io', [basePackage])
.processor(require('./processors/addJadeDataDocsProcessor')) .processor(require('./processors/addJadeDataDocsProcessor'))
// MIGRATION: added this processor // MIGRATION: added this processor
.processor(require('./processors/fixOutputPathProcessor')) .processor(require('./processors/fixOutputPathProcessor'))
// overrides base packageInfo and returns the one for the 'angular/angular' repo. // MIGRATION: added packageInfo to point to angular/angular repo
// overrides base packageInfo and returns the one for the 'angular/angular' repo.
.factory(require('./services/packageInfo')) .factory(require('./services/packageInfo'))
// Configure rendering // Configure rendering
@ -22,15 +23,17 @@ module.exports = new Package('angular.io', [basePackage])
.unshift(path.resolve(__dirname, 'templates')); .unshift(path.resolve(__dirname, 'templates'));
}) })
.config(function(writeFilesProcessor) { .config(function(writeFilesProcessor, readFilesProcessor) {
// MIGRATION: HACK - readFileProcessor.basePath set to point to a local repo location
// because the docs-package-processor will
// have previously set it to point to angular/angular repo.
// needed because the writeFilesProcessor uses the readFilesProcessor's basePath.
readFilesProcessor.basePath = path.resolve(__dirname, "../../docs");
writeFilesProcessor.outputFolder = 'js/latest/api'; writeFilesProcessor.outputFolder = 'js/latest/api';
}) })
.config(function(readFilesProcessor, generateNavigationDoc, createOverviewDump) { .config(function(readFilesProcessor, generateNavigationDoc, createOverviewDump) {
// Clear out unwanted processors // Clear out unwanted processors
// MIGRATION: HACK - added basePath to point to a local repo location because the docs-package-processor will
// have previously set it to point to angular/angular repo.
readFilesProcessor.basePath = path.resolve(__dirname, "../../docs");
readFilesProcessor.$enabled = false; readFilesProcessor.$enabled = false;
generateNavigationDoc.$enabled = false; generateNavigationDoc.$enabled = false;
createOverviewDump.$enabled = false; createOverviewDump.$enabled = false;

View File

@ -9,6 +9,6 @@ var path = require('canonical-path');
*/ */
module.exports = function packageInfo() { module.exports = function packageInfo() {
var topLevelPackageJson= path.join('../angular','package.json'); var angularPackageJson= path.join('../angular','package.json');
return JSON.parse(fs.readFileSync(topLevelPackageJson), 'UTF-8'); return JSON.parse(fs.readFileSync(angularPackageJson), 'UTF-8');
} }