@@ -72,9 +72,10 @@ var _apiShredOptions = {
72
72
logLevel : _dgeniLogLevel
73
73
} ;
74
74
75
+ const relDartDocApiDir = path . join ( 'doc' , 'api' ) ;
75
76
var _apiShredOptionsForDart = {
76
77
lang : 'dart' ,
77
- examplesDir : path . resolve ( ngPathFor ( 'dart' ) , 'examples ' ) ,
78
+ examplesDir : path . resolve ( ngPathFor ( 'dart' ) , 'example ' ) ,
78
79
fragmentsDir : path . join ( DOCS_PATH , '_fragments/_api' ) ,
79
80
zipDir : path . join ( RESOURCES_PATH , 'zips/api' ) ,
80
81
logLevel : _dgeniLogLevel
@@ -346,6 +347,7 @@ function runE2eDartTests(appDir, outputFile) {
346
347
}
347
348
if ( argv . pub === false ) {
348
349
var prepPromise = Promise . resolve ( true ) ;
350
+ gutil . log ( 'Skipping pub upgrade and pub build (--no-pub flag present)' ) ;
349
351
} else {
350
352
var pubUpgradeSpawnInfo = spawnExt ( 'pub' , [ 'upgrade' ] , { cwd : appDir } ) ;
351
353
var prepPromise = pubUpgradeSpawnInfo . promise . then ( function ( data ) {
@@ -608,8 +610,8 @@ gulp.task('build-dart-cheatsheet', [], function() {
608
610
609
611
gulp . task ( 'dartdoc' , [ 'pub upgrade' ] , function ( ) {
610
612
const ngRepoPath = ngPathFor ( 'dart' ) ;
611
- if ( argv . fast && fs . existsSync ( path . resolve ( ngRepoPath , 'docs' , 'api' ) ) ) {
612
- gutil . log ( ' Skipping dartdoc: --fast flag enabled and "docs/ api" dir exists' ) ;
613
+ if ( argv . fast && fs . existsSync ( path . resolve ( ngRepoPath , relDartDocApiDir ) ) ) {
614
+ gutil . log ( ` Skipping dartdoc: --fast flag enabled and api dir exists ( ${ relDartDocApiDir } )` ) ;
613
615
return true ;
614
616
}
615
617
checkAngularProjectPath ( ngRepoPath ) ;
@@ -618,7 +620,7 @@ gulp.task('dartdoc', ['pub upgrade'], function() {
618
620
renameIfExistsSync ( topLevelLibFilePath , tmpPath ) ;
619
621
gutil . log ( `Hiding top-level angular2 library: ${ topLevelLibFilePath } ` ) ;
620
622
// Remove dartdoc '--add-crossdart' flag while we are fixing links to API pages.
621
- const dartdoc = spawnExt ( 'dartdoc' , [ '--output' , 'docs/api' ] , { cwd : ngRepoPath } ) ;
623
+ const dartdoc = spawnExt ( 'dartdoc' , [ '--output' , relDartDocApiDir ] , { cwd : ngRepoPath } ) ;
622
624
return dartdoc . promise . finally ( ( ) => {
623
625
gutil . log ( `Restoring top-level angular2 library: ${ topLevelLibFilePath } ` ) ;
624
626
renameIfExistsSync ( tmpPath , topLevelLibFilePath ) ;
@@ -1246,7 +1248,7 @@ function buildApiDocsForDart() {
1246
1248
log . level = _dgeniLogLevel ;
1247
1249
const dabInfo = dab . dartPkgConfigInfo ;
1248
1250
dabInfo . ngIoDartApiDocPath = path . join ( DOCS_PATH , 'dart' , vers , 'api' ) ;
1249
- dabInfo . ngDartDocPath = path . join ( ngPathFor ( 'dart' ) , 'docs' , 'api' ) ;
1251
+ dabInfo . ngDartDocPath = path . join ( ngPathFor ( 'dart' ) , relDartDocApiDir ) ;
1250
1252
// Exclude API entries for developer/internal libraries. Also exclude entries for
1251
1253
// the top-level catch all "angular2" library (otherwise every entry appears twice).
1252
1254
dabInfo . excludeLibRegExp = new RegExp ( / ^ (? ! a n g u l a r 2 ) | \. t e s t i n g | _ | c o d e g e n | ^ a n g u l a r 2 $ / ) ;
0 commit comments