@@ -37,7 +37,7 @@ var TEMP_PATH = './_temp';
37
37
var DOCS_PATH = path . join ( PUBLIC_PATH , 'docs' ) ;
38
38
39
39
var EXAMPLES_PATH = path . join ( DOCS_PATH , '_examples' ) ;
40
- var EXAMPLES_PROTRACTOR_PATH = path . join ( EXAMPLES_PATH , '_protractor ' ) ;
40
+ var BOILERPLATE_PATH = path . join ( EXAMPLES_PATH , '_boilerplate ' ) ;
41
41
var NOT_API_DOCS_GLOB = path . join ( PUBLIC_PATH , './{docs/*/latest/!(api),!(docs)}/**/*.*' ) ;
42
42
var RESOURCES_PATH = path . join ( PUBLIC_PATH , 'resources' ) ;
43
43
var LIVE_EXAMPLES_PATH = path . join ( RESOURCES_PATH , 'live-examples' ) ;
@@ -89,22 +89,18 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
89
89
} ) ;
90
90
91
91
var _exampleBoilerplateFiles = [
92
- '.editorconfig' ,
93
92
'a2docs.css' ,
94
93
'package.json' ,
95
94
'styles.css' ,
96
95
'systemjs.config.js' ,
97
96
'tsconfig.json' ,
98
97
'tslint.json' ,
99
- 'typings.json'
98
+ 'typings.json' ,
99
+ 'wallaby.js'
100
100
] ;
101
101
102
102
var _exampleDartWebBoilerPlateFiles = [ 'a2docs.css' , 'styles.css' ] ;
103
103
104
- var _exampleProtractorBoilerplateFiles = [
105
- 'tsconfig.json'
106
- ] ;
107
-
108
104
var _exampleConfigFilename = 'example-config.json' ;
109
105
110
106
var _styleLessName = 'a2docs.less' ;
@@ -197,18 +193,13 @@ function runE2e() {
197
193
});
198
194
*/
199
195
// Not 'fast'; do full setup
200
- gutil . log ( 'runE2e: install _protractor stuff' ) ;
201
- var spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
196
+ gutil . log ( 'runE2e: install _examples stuff' ) ;
197
+ var spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } ) ;
202
198
promise = spawnInfo . promise
203
- . then ( function ( ) {
204
- gutil . log ( 'runE2e: install _examples stuff' ) ;
205
- spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } )
206
- return spawnInfo . promise ;
207
- } )
208
199
. then ( function ( ) {
209
200
buildStyles ( copyExampleBoilerplate , _ . noop ) ;
210
201
gutil . log ( 'runE2e: update webdriver' ) ;
211
- spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
202
+ spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PATH } ) ;
212
203
return spawnInfo . promise ;
213
204
} ) ;
214
205
} ;
@@ -243,11 +234,10 @@ function findAndRunE2eTests(filter, outputFile) {
243
234
fs . writeFileSync ( outputFile , header ) ;
244
235
245
236
// create an array of combos where each
246
- // combo consists of { examplePath: ... , protractorConfigFilename: ... }
237
+ // combo consists of { examplePath: ... }
247
238
var examplePaths = [ ] ;
248
239
var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
249
240
e2eSpecPaths . forEach ( function ( specPath ) {
250
- var destConfig = path . join ( specPath , 'protractor.config.js' ) ;
251
241
// get all of the examples under each dir where a pcFilename is found
252
242
localExamplePaths = getExamplePaths ( specPath , true ) ;
253
243
// Filter by language
@@ -316,7 +306,7 @@ function runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile) {
316
306
// start protractor
317
307
318
308
var spawnInfo = spawnExt ( 'npm' , [ 'run' , 'protractor' , '--' , 'protractor.config.js' ,
319
- `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
309
+ `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PATH } ) ;
320
310
321
311
spawnInfo . proc . stderr . on ( 'data' , function ( data ) {
322
312
transpileError = transpileError || / n p m E R R ! E x i t s t a t u s 1 0 0 / . test ( data . toString ( ) ) ;
@@ -478,12 +468,12 @@ function buildStyles(cb, done){
478
468
function copyExampleBoilerplate ( ) {
479
469
gutil . log ( 'Copying example boilerplate files' ) ;
480
470
var sourceFiles = _exampleBoilerplateFiles . map ( function ( fn ) {
481
- return path . join ( EXAMPLES_PATH , fn ) ;
471
+ return path . join ( BOILERPLATE_PATH , fn ) ;
482
472
} ) ;
483
473
var examplePaths = excludeDartPaths ( getExamplePaths ( EXAMPLES_PATH ) ) ;
484
474
485
475
var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles . map ( function ( fn ) {
486
- return path . join ( EXAMPLES_PATH , fn ) ;
476
+ return path . join ( BOILERPLATE_PATH , fn ) ;
487
477
} ) ;
488
478
var dartExampleWebPaths = getDartExampleWebPaths ( EXAMPLES_PATH ) ;
489
479
@@ -492,14 +482,6 @@ function copyExampleBoilerplate() {
492
482
return copyFiles ( sourceFiles , examplePaths , destFileMode )
493
483
. then ( function ( ) {
494
484
return copyFiles ( dartWebSourceFiles , dartExampleWebPaths , destFileMode ) ;
495
- } )
496
- // copy certain files from _examples/_protractor dir to each subdir that contains an e2e-spec file.
497
- . then ( function ( ) {
498
- var protractorSourceFiles =
499
- _exampleProtractorBoilerplateFiles
500
- . map ( function ( name ) { return path . join ( EXAMPLES_PROTRACTOR_PATH , name ) ; } ) ; ;
501
- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
502
- return copyFiles ( protractorSourceFiles , e2eSpecPaths , destFileMode ) ;
503
485
} ) ;
504
486
}
505
487
@@ -578,11 +560,6 @@ function deleteExampleBoilerPlate() {
578
560
return deleteFiles ( _exampleBoilerplateFiles , examplePaths )
579
561
. then ( function ( ) {
580
562
return deleteFiles ( _exampleDartWebBoilerPlateFiles , dartExampleWebPaths ) ;
581
- } )
582
- . then ( function ( ) {
583
- var protractorFiles = _exampleProtractorBoilerplateFiles ;
584
- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
585
- return deleteFiles ( protractorFiles , e2eSpecPaths ) ;
586
563
} ) ;
587
564
}
588
565
@@ -802,7 +779,7 @@ gulp.task('_harp-compile', function() {
802
779
803
780
gulp . task ( '_shred-devguide-examples' , [ '_shred-clean-devguide' , '_copy-example-boilerplate' ] , function ( ) {
804
781
// Split big shredding task into partials 2016-06-14
805
- var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' , '_protractor/' ] } ) ;
782
+ var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' ] } ) ;
806
783
var promise = Promise . resolve ( true ) ;
807
784
examplePaths . forEach ( function ( examplePath ) {
808
785
promise = promise . then ( ( ) => docShredder . shredSingleExampleDir ( _devguideShredOptions , examplePath ) ) ;
@@ -861,7 +838,6 @@ gulp.task('lint', function() {
861
838
'!./public/docs/_examples/**/ts-snippets/*.ts' ,
862
839
'!./public/docs/_examples/style-guide/ts/**/*.avoid.ts' ,
863
840
'!./public/docs/_examples/**/node_modules/**/*' ,
864
- '!./public/docs/_examples/_protractor/**/*' ,
865
841
'!./public/docs/_examples/**/typings/**/*' ,
866
842
'!./public/docs/_examples/**/typings-ng1/**/*' ,
867
843
'!./public/docs/_examples/**/build/**/*' ,
@@ -1122,7 +1098,7 @@ function getTypingsPaths(basePath) {
1122
1098
1123
1099
function getExamplePaths ( basePath , includeBase ) {
1124
1100
// includeBase defaults to false
1125
- return getPaths ( basePath , _exampleConfigFilename , includeBase )
1101
+ return getPaths ( basePath , _exampleConfigFilename , includeBase ) ;
1126
1102
}
1127
1103
1128
1104
function getDartExampleWebPaths ( basePath ) {
@@ -1145,6 +1121,8 @@ function getFilenames(basePath, filename, includeBase) {
1145
1121
// ignore (skip) the top level version.
1146
1122
includePatterns . push ( "!" + path . join ( basePath , "/" + filename ) ) ;
1147
1123
}
1124
+ // ignore (skip) the files in BOILERPLATE_PATH.
1125
+ includePatterns . push ( "!" + path . join ( BOILERPLATE_PATH , "/" + filename ) ) ;
1148
1126
var nmPattern = path . join ( basePath , "**/node_modules/**" ) ;
1149
1127
var filenames = globby . sync ( includePatterns , { ignore : [ nmPattern ] } ) ;
1150
1128
return filenames ;
0 commit comments