@@ -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,25 +89,18 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
89
89
} ) ;
90
90
91
91
var _exampleBoilerplateFiles = [
92
- '.editorconfig' ,
93
92
'a2docs.css' ,
94
93
'karma.conf.js' ,
95
94
'karma-test-shim.js' ,
96
95
'package.json' ,
97
96
'styles.css' ,
98
97
'systemjs.config.js' ,
99
98
'tsconfig.json' ,
100
- 'tslint.json' ,
101
- 'typings.json' ,
102
99
'wallaby.js'
103
100
] ;
104
101
105
102
var _exampleDartWebBoilerPlateFiles = [ 'a2docs.css' , 'styles.css' ] ;
106
103
107
- var _exampleProtractorBoilerplateFiles = [
108
- 'tsconfig.json'
109
- ] ;
110
-
111
104
var _exampleConfigFilename = 'example-config.json' ;
112
105
113
106
var _styleLessName = 'a2docs.less' ;
@@ -200,18 +193,13 @@ function runE2e() {
200
193
});
201
194
*/
202
195
// Not 'fast'; do full setup
203
- gutil . log ( 'runE2e: install _protractor stuff' ) ;
204
- 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 } ) ;
205
198
promise = spawnInfo . promise
206
- . then ( function ( ) {
207
- gutil . log ( 'runE2e: install _examples stuff' ) ;
208
- spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } )
209
- return spawnInfo . promise ;
210
- } )
211
199
. then ( function ( ) {
212
200
buildStyles ( copyExampleBoilerplate , _ . noop ) ;
213
201
gutil . log ( 'runE2e: update webdriver' ) ;
214
- spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
202
+ spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PATH } ) ;
215
203
return spawnInfo . promise ;
216
204
} ) ;
217
205
} ;
@@ -246,11 +234,10 @@ function findAndRunE2eTests(filter, outputFile) {
246
234
fs . writeFileSync ( outputFile , header ) ;
247
235
248
236
// create an array of combos where each
249
- // combo consists of { examplePath: ... , protractorConfigFilename: ... }
237
+ // combo consists of { examplePath: ... }
250
238
var examplePaths = [ ] ;
251
239
var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
252
240
e2eSpecPaths . forEach ( function ( specPath ) {
253
- var destConfig = path . join ( specPath , 'protractor.config.js' ) ;
254
241
// get all of the examples under each dir where a pcFilename is found
255
242
localExamplePaths = getExamplePaths ( specPath , true ) ;
256
243
// Filter by language
@@ -319,7 +306,7 @@ function runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile) {
319
306
// start protractor
320
307
321
308
var spawnInfo = spawnExt ( 'npm' , [ 'run' , 'protractor' , '--' , 'protractor.config.js' ,
322
- `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
309
+ `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PATH } ) ;
323
310
324
311
spawnInfo . proc . stderr . on ( 'data' , function ( data ) {
325
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 ( ) ) ;
@@ -481,12 +468,12 @@ function buildStyles(cb, done){
481
468
function copyExampleBoilerplate ( ) {
482
469
gutil . log ( 'Copying example boilerplate files' ) ;
483
470
var sourceFiles = _exampleBoilerplateFiles . map ( function ( fn ) {
484
- return path . join ( EXAMPLES_PATH , fn ) ;
471
+ return path . join ( BOILERPLATE_PATH , fn ) ;
485
472
} ) ;
486
473
var examplePaths = excludeDartPaths ( getExamplePaths ( EXAMPLES_PATH ) ) ;
487
474
488
475
var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles . map ( function ( fn ) {
489
- return path . join ( EXAMPLES_PATH , fn ) ;
476
+ return path . join ( BOILERPLATE_PATH , fn ) ;
490
477
} ) ;
491
478
var dartExampleWebPaths = getDartExampleWebPaths ( EXAMPLES_PATH ) ;
492
479
@@ -495,14 +482,6 @@ function copyExampleBoilerplate() {
495
482
return copyFiles ( sourceFiles , examplePaths , destFileMode )
496
483
. then ( function ( ) {
497
484
return copyFiles ( dartWebSourceFiles , dartExampleWebPaths , destFileMode ) ;
498
- } )
499
- // copy certain files from _examples/_protractor dir to each subdir that contains an e2e-spec file.
500
- . then ( function ( ) {
501
- var protractorSourceFiles =
502
- _exampleProtractorBoilerplateFiles
503
- . map ( function ( name ) { return path . join ( EXAMPLES_PROTRACTOR_PATH , name ) ; } ) ; ;
504
- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
505
- return copyFiles ( protractorSourceFiles , e2eSpecPaths , destFileMode ) ;
506
485
} ) ;
507
486
}
508
487
@@ -581,11 +560,6 @@ function deleteExampleBoilerPlate() {
581
560
return deleteFiles ( _exampleBoilerplateFiles , examplePaths )
582
561
. then ( function ( ) {
583
562
return deleteFiles ( _exampleDartWebBoilerPlateFiles , dartExampleWebPaths ) ;
584
- } )
585
- . then ( function ( ) {
586
- var protractorFiles = _exampleProtractorBoilerplateFiles ;
587
- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
588
- return deleteFiles ( protractorFiles , e2eSpecPaths ) ;
589
563
} ) ;
590
564
}
591
565
@@ -805,7 +779,7 @@ gulp.task('_harp-compile', function() {
805
779
806
780
gulp . task ( '_shred-devguide-examples' , [ '_shred-clean-devguide' , '_copy-example-boilerplate' ] , function ( ) {
807
781
// Split big shredding task into partials 2016-06-14
808
- var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' , '_protractor/' ] } ) ;
782
+ var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' ] } ) ;
809
783
var promise = Promise . resolve ( true ) ;
810
784
examplePaths . forEach ( function ( examplePath ) {
811
785
promise = promise . then ( ( ) => docShredder . shredSingleExampleDir ( _devguideShredOptions , examplePath ) ) ;
@@ -864,7 +838,6 @@ gulp.task('lint', function() {
864
838
'!./public/docs/_examples/**/ts-snippets/*.ts' ,
865
839
'!./public/docs/_examples/style-guide/ts/**/*.avoid.ts' ,
866
840
'!./public/docs/_examples/**/node_modules/**/*' ,
867
- '!./public/docs/_examples/_protractor/**/*' ,
868
841
'!./public/docs/_examples/**/typings/**/*' ,
869
842
'!./public/docs/_examples/**/typings-ng1/**/*' ,
870
843
'!./public/docs/_examples/**/build/**/*' ,
0 commit comments